Dear Aldo,
When entering a covariate vector, its length has to match the number of
input images. When using a paired t-test you covary out any subject
specific effect so a covariate with two identical values per subject
will have no explanatory power. Instead you might want to compute the
difference between the pair of images per subject (e.g. using ImCalc)
and use them in a one-sample t-test (with age as covariate).
Best regards,
Guillaume.
On 27/01/2020 16:45, Aldo Camargo wrote:
> Hi group:
>
> I am trying to add covariates to the computation of the t-pair test, but
> the script is not working
>
> This is part of the code :
> matlabbatch{1}.spm.stats.factorial_design.des.pt.pair=pair;
> matlabbatch{1}.spm.stats.factorial_design.des.pt.gmsca = 0;
> matlabbatch{1}.spm.stats.factorial_design.des.pt.ancova = 0;
> matlabbatch{1}.spm.stats.factorial_design.cov = struct('c', {},
> 'cname', {}, 'iCFI', {}, 'iCC', {});
> matlabbatch{1}.spm.stats.factorial_design.multi_cov =
> struct('files', {}, 'iCFI', {}, 'iCC', {});
> matlabbatch{1}.spm.stats.factorial_design.masking.tm.tm_none = 1;
> matlabbatch{1}.spm.stats.factorial_design.masking.im
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fspm.stats.factorial_design.masking.im%2F&data=02%7C01%7C%7Cfbac664410e943dc279008d7a34871a5%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C1%7C637157403843556241&sdata=kpvBK3bthAOD%2BHmgmQbsaRPvyUUrVnB%2Byd%2Bbmbb2AXI%3D&reserved=0>
> = 1;
>
> matlabbatch{1}.spm.stats.factorial_design.globalc.g_omit = 1;
> matlabbatch{1}.spm.stats.factorial_design.globalm.gmsca.gmsca_no
> = 1;
> matlabbatch{1}.spm.stats.factorial_design.globalm.glonorm = 1;
>
> % Adding the following for the computation of covariates
> matlabbatch{1}.spm.stats.factorial_design.cov.c = AGE;
> matlabbatch{1}.spm.stats.factorial_design.cov.cname = 'AGE';
> matlabbatch{1}.spm.stats.factorial_design.cov.iCFI = 1;
> matlabbatch{1}.spm.stats.factorial_design.cov.iCC = 1;
>
> Does someone knows how to do the covariate in SPM ?
>
> Have a nice day,
>
> Aldo
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|