# PPI Analysis

### From ACLab Wiki

Psychophysiological Interactions for SPM. Hopefully this is actually easier to understand than what's currently available on the web.;

1. Pick an ROI. You should have some sort of .mat file at the end of this step that tells SPM what your ROI is on the glass brain.

One idea is to just use the VOI function with the peak voxel and a 3mm sphere instead of worrying about using the exact ROI cluster.

2. FOR AN INDIVIDUAL SUBJECT (or even an individual run), PLOT the signal change in that ROI. You can use the SPM VOI function, but if the ROI is derived from a second level (group) analysis, that won't help you much unless that same ROI is apparent in your first level (individual) contrast. I suggest using marsbar. At the end of this step you should have a vector of numbers representing signal equal in length to the number of TRs in your design.

3. Normalize this vector. The command I think you should use in the matlab window is 'spm_detrend'. If Y is your vector of numbers, then detrending this vector looks like:

Y = spm_detrend( Y );

I don't really know what that does other than mean subtract. You might want to get rid of giant spikes and run based mean changes:

tempdev = std(rtest);
maxdev = 3*tempdev;
for i = 1:size(rtest,1)
if (abs(rtest(i)) > maxdev)
rtest(i) = 0
end
end
r1mean = mean(rtest(1:297))
r2mean = mean(rtest(298:594))
for i = 1:297
rtest(i) = rtest(i) - r1mean;
end
for i = 298:594
rtest(i) = rtest(i) - r2mean;
end

Here's the untranslated part that I'm still working through:

4. Next you need to create a regressor P corresponding to the Psychological Factor 1,2. It is important to retain the same order of scans that is assumed by y. So you need to give the value 1 to all scans corresponding to conds A1 and B1 and (-1) to all the other scans (conds A2 and B2). You should now have a vector of equal size to your vector from step 2; length = number of scans in your study), consisting of 1s and (-1)s. This vector has a mean = 0 so does not require mean-correction. This is Factor (1, 2) say P = [1 (- 1) 1 (-1) ...]');

5. Multiply these 2 vectors together and mean correct the result. PPI = P( : ) .* y( : );

Now you have three vectors: a) activity in a particular voxel over the time course of the experiment y b) condition order P c) the interaction between activity in a particular voxel and the corresponding task PPI

6. Go into SPM, carry out a statistical analysis specifying User Specified type of analysis. Specify 1 covariate of interest, and enter the name of the matlab vector that corresponds to PPI above. Enter the two other vectors (P and y above) as confounds. Enter 2 contrasts: 1 and -1.

This analysis will calculate regressions at every voxel in the brain for the confounds P and y. Differences between the regression slopes of BOLD/rCBF on y under levels 1 and 2 of the psychological factor are tested directly to produce a SPM{t}. The resultant MIP demonstrates the presence of significant psychophysiological interactions i.e. voxels in which the contribution of the thalamus changed significantly as a function of context (1 vs. 2): contrast 1 shows areas for which there is a significant positive regression slope difference; contrast -1 shows areas for which there is a significant negative regression slope difference.