Reply-To: | | [log in to unmask][log in to unmask]> >>>>> wrote: >>>>>> Hi all, >>>>>> I have a question concerning the code used to implement a PPI analysis. >>>>>> >>>>>> In the spm_peb_ppi.m function packaged with SPM8, lines 329-332 remove >>>>>> confounds from the input seed region¹s time course: >>>>>> >>>>>> % Remove confounds and save Y in ouput structure >>>>>> %------------------------------------------------------------------------ >>>>>> -- >>>>>> Yc = Y - X0*inv(X0'*X0)*X0'*Y; >>>>>> PPI.Y = Yc(:,1); >>>>>> >>>>>> PPI.Y is then to be used as a covariate of no interest when building the >>>>>> PPI >>>>>> regression model. However, on line 488, it is the uncorrected seed time >>>>>> course, Y, that is input to the deconvolution routine and used to >>>>>> generate >>>>>> the ppi term: >>>>>> >>>>>> C = spm_PEB(Y,P); >>>>>> xn = xb*C{2}.E(1:N); >>>>>> xn = spm_detrend(xn); >>>>>> >>>>>> % Setup psychological variable from inputs and contast weights >>>>>> %---------------------------------------------------------------------- >>>>>> PSY = zeros(N*NT,1); >>>>>> for i = 1:size(U.u,2) >>>>>> PSY = PSY + full(U.u(:,i)*U.w(:,i)); >>>>>> end >>>>>> % PSY = spm_detrend(PSY); <- removed centering of psych variable >>>>>> % prior to multiplication with xn. Based on discussion with Karl >>>>>> % and Donald McLaren. >>>>>> >>>>>> % Multiply psychological variable by neural signal >>>>>> >>>>>> %---------------------------------Åhé,- |