Centering for ANCOVA

Hello, I am trying to run an ANOVA with three groups and want to covary for age. I understand that if no qVars option is given, the default is to center age across the whole sample, however I want to center age within each group. I know the help document says to do this myself and then put it in the datatable, but my question is will the command then try to center it again since there is no option to “turn off” centering or will it recognize that the variables are centered. Thanks!


will the command then try to center it again since there is no option to “turn off” centering
or will it recognize that the variables are centered

To turn off the centering, you need to specify a 0 center value with -qVarsCenters.

One last question.
I am doing a one-way ANOVA with three independent groups (HCC, LCC, and SZ). All I want to know is what are the omnibus differences among the three groups, but I want to do this while "controling/adjusting " for the effect of Age.

Do I need to specify this in a glt code?

If so, is this correct?

-gltLabel 1 GROUP -gltCode 1 'Grp : 1HCC -1LCC -2*SZ Age : ’

I’m not really clear what -2 multiplied by the SZ group means but I can’t figure out how else to put all three groups in the comparison.

All I want to know is what are the omnibus differences among the three groups, but
I want to do this while "controling/adjusting " for the effect of Age.

If you center the covariate “Age” properly, such an omnibus F-stat is automatically provided in the output from 3dMVM. And you don’t need to make a request through -gltCode.

Hmmmm, that’s what I thought. Although when I ran it with my centered variable it came out identical to my original analysis without a covariate, which is a little unrealistic.

I centered Age within each group and then put the centered age in my syntax (below). Am I missing something?

3dMVM -prefix ANOVA_rECN_ageCOV_GRPcenter
-mask MNI152_T1_2mm_brain_mask.nii.gz
-bsVars Grp
-qVars Age
-qVarCenters 0
Subj Grp Age InputFile
s1 HCC -0.71536 dr_stage2_subject00000_Z.nii.gz’[1]’
s2 HCC 1.06732 dr_stage2_subject00001_Z.nii.gz’[1]’
s3 HCC -0.71536 dr_stage2_subject00002_Z.nii.gz’[1]’
s4 HCC -0.18055 dr_stage2_subject00003_Z.nii.gz’[1]’
s5 HCC -1.07189 dr_stage2_subject00004_Z.nii.gz’[1]’
s6 HCC -0.18055 dr_stage2_subject00005_Z.nii.gz’[1]’
s7 HCC -0.80449 dr_stage2_subject00006_Z.nii.gz’[1]’
s8 HCC -0.71536 dr_stage2_subject00007_Z.nii.gz’[1]’
s9 HCC 1.42386 dr_stage2_subject00008_Z.nii.gz’[1]’
s10 HCC -0.71536 dr_stage2_subject00009_Z.nii.gz’[1]’
s11 HCC -0.62622 dr_stage2_subject00010_Z.nii.gz’[1]’
s12 HCC -0.35882 dr_stage2_subject00011_Z.nii.gz’[1]’
s13 HCC -0.44795 dr_stage2_subject00012_Z.nii.gz’[1]’
s14 HCC -1.07189 dr_stage2_subject00056_Z.nii.gz’[1]’
s15 HCC -0.80449 dr_stage2_subject00013_Z.nii.gz’[1]’
s16 HCC -0.71536 dr_stage2_subject00014_Z.nii.gz’[1]’
s17 HCC -0.35882 dr_stage2_subject00015_Z.nii.gz’[1]’
s18 HCC -0.62622 dr_stage2_subject00016_Z.nii.gz’[1]’
s19 HCC -0.98276 dr_stage2_subject00017_Z.nii.gz’[1]’
s20 HCC -0.18055 dr_stage2_subject00018_Z.nii.gz’[1]’
s21 HCC 0.35425 dr_stage2_subject00019_Z.nii.gz’[1]’
s22 HCC -0.53709 dr_stage2_subject00020_Z.nii.gz’[1]’
s23 HCC 1.86953 dr_stage2_subject00021_Z.nii.gz’[1]’
s24 HCC -0.18055 dr_stage2_subject00022_Z.nii.gz’[1]’
s25 HCC 2.49346 dr_stage2_subject00023_Z.nii.gz’[1]’
s26 HCC 2.40433 dr_stage2_subject00024_Z.nii.gz’[1]’
s27 HCC 0.44338 dr_stage2_subject00025_Z.nii.gz’[1]’
s28 HCC 1.51299 dr_stage2_subject00026_Z.nii.gz’[1]’
s29 HCC 1.51299 dr_stage2_subject00027_Z.nii.gz’[1]’
s30 HCC 0.62165 dr_stage2_subject00028_Z.nii.gz’[1]’
s31 HCC 0.53252 dr_stage2_subject00029_Z.nii.gz’[1]’
s32 HCC -0.53709 dr_stage2_subject00030_Z.nii.gz’[1]’
s33 HCC -0.35882 dr_stage2_subject00031_Z.nii.gz’[1]’
s34 HCC 1.60212 dr_stage2_subject00032_Z.nii.gz’[1]’
s35 HCC -0.80449 dr_stage2_subject00033_Z.nii.gz’[1]’
s36 HCC -0.89362 dr_stage2_subject00034_Z.nii.gz’[1]’
s37 HCC -0.44795 dr_stage2_subject00035_Z.nii.gz’[1]’
s38 HCC -0.26969 dr_stage2_subject00036_Z.nii.gz’[1]’
s39 HCC -0.53709 dr_stage2_subject00037_Z.nii.gz’[1]’
s40 LCC 1.24464 dr_stage2_subject00038_Z.nii.gz’[1]’
s41 LCC -1.44737 dr_stage2_subject00039_Z.nii.gz’[1]’
s42 LCC -1.17817 dr_stage2_subject00040_Z.nii.gz’[1]’
s43 LCC -0.63977 dr_stage2_subject00041_Z.nii.gz’[1]’
s44 LCC -0.9987 dr_stage2_subject00042_Z.nii.gz’[1]’
s45 LCC 1.60358 dr_stage2_subject00043_Z.nii.gz’[1]’
s46 LCC -0.37057 dr_stage2_subject00044_Z.nii.gz’[1]’
s47 LCC -1.53711 dr_stage2_subject00045_Z.nii.gz’[1]’
s48 LCC -1.35764 dr_stage2_subject00046_Z.nii.gz’[1]’
s49 LCC -0.4603 dr_stage2_subject00047_Z.nii.gz’[1]’
s50 LCC -0.01163 dr_stage2_subject00048_Z.nii.gz’[1]’
s51 LCC -0.9987 dr_stage2_subject00049_Z.nii.gz’[1]’
s52 LCC -0.37057 dr_stage2_subject00050_Z.nii.gz’[1]’
s53 LCC -1.08844 dr_stage2_subject00051_Z.nii.gz’[1]’
s54 LCC -0.63977 dr_stage2_subject00052_Z.nii.gz’[1]’
s55 LCC -1.26791 dr_stage2_subject00053_Z.nii.gz’[1]’
s56 LCC -0.28083 dr_stage2_subject00054_Z.nii.gz’[1]’
s57 LCC -0.90897 dr_stage2_subject00055_Z.nii.gz’[1]’
s58 LCC 1.06517 dr_stage2_subject00057_Z.nii.gz’[1]’
s59 LCC 0.79597 dr_stage2_subject00058_Z.nii.gz’[1]’
s60 LCC -0.4603 dr_stage2_subject00059_Z.nii.gz’[1]’
s61 LCC -0.37057 dr_stage2_subject00060_Z.nii.gz’[1]’
s62 LCC 0.79597 dr_stage2_subject00061_Z.nii.gz’[1]’
s63 LCC -0.37057 dr_stage2_subject00062_Z.nii.gz’[1]’
s64 LCC 1.33437 dr_stage2_subject00063_Z.nii.gz’[1]’
s65 LCC -0.81924 dr_stage2_subject00064_Z.nii.gz’[1]’
s66 LCC 1.24464 dr_stage2_subject00065_Z.nii.gz’[1]’
s67 LCC 0.6165 dr_stage2_subject00066_Z.nii.gz’[1]’
s68 LCC 1.78304 dr_stage2_subject00067_Z.nii.gz’[1]’
s69 LCC -0.7295 dr_stage2_subject00068_Z.nii.gz’[1]’
s70 LCC -0.4603 dr_stage2_subject00069_Z.nii.gz’[1]’
s71 LCC -0.1911 dr_stage2_subject00070_Z.nii.gz’[1]’
s72 LCC 2.50091 dr_stage2_subject00071_Z.nii.gz’[1]’
s73 LCC 0.43704 dr_stage2_subject00072_Z.nii.gz’[1]’
s74 LCC -0.4603 dr_stage2_subject00073_Z.nii.gz’[1]’
s75 LCC -0.4603 dr_stage2_subject00074_Z.nii.gz’[1]’
s76 LCC -0.10137 dr_stage2_subject00075_Z.nii.gz’[1]’
s77 LCC 0.6165 dr_stage2_subject00076_Z.nii.gz’[1]’
s78 LCC 0.88571 dr_stage2_subject00077_Z.nii.gz’[1]’
s79 LCC 0.79597 dr_stage2_subject00078_Z.nii.gz’[1]’
s80 LCC 2.14198 dr_stage2_subject00079_Z.nii.gz’[1]’
s81 LCC -0.4603 dr_stage2_subject00080_Z.nii.gz’[1]’
s82 LCC 1.78304 dr_stage2_subject00081_Z.nii.gz’[1]’
s83 LCC 0.79597 dr_stage2_subject00082_Z.nii.gz’[1]’
s84 LCC -0.28083 dr_stage2_subject00083_Z.nii.gz’[1]’
s85 LCC 0.43704 dr_stage2_subject00084_Z.nii.gz’[1]’
s86 LCC -0.10137 dr_stage2_subject00085_Z.nii.gz’[1]’
s87 LCC 0.6165 dr_stage2_subject00086_Z.nii.gz’[1]’
s88 LCC -0.7295 dr_stage2_subject00087_Z.nii.gz’[1]’
s89 LCC -1.35764 dr_stage2_subject00088_Z.nii.gz’[1]’
s90 LCC -0.81924 dr_stage2_subject00089_Z.nii.gz’[1]’
s91 LCC 0.0781 dr_stage2_subject00090_Z.nii.gz’[1]’
s92 LCC 1.06517 dr_stage2_subject00091_Z.nii.gz’[1]’
s93 LCC -0.90897 dr_stage2_subject00092_Z.nii.gz’[1]’
s94 SZ 0.94194 dr_stage2_subject00093_Z.nii.gz’[1]’
s95 SZ -1.6737 dr_stage2_subject00094_Z.nii.gz’[1]’
s96 SZ -0.27246 dr_stage2_subject00095_Z.nii.gz’[1]’
s97 SZ -0.27246 dr_stage2_subject00096_Z.nii.gz’[1]’
s98 SZ 0.94194 dr_stage2_subject00097_Z.nii.gz’[1]’
s99 SZ 1.40902 dr_stage2_subject00098_Z.nii.gz’[1]’
s100 SZ 0.56828 dr_stage2_subject00099_Z.nii.gz’[1]’
s101 SZ 0.94194 dr_stage2_subject00100_Z.nii.gz’[1]’
s102 SZ 0.56828 dr_stage2_subject00101_Z.nii.gz’[1]’
s103 SZ 1.12878 dr_stage2_subject00102_Z.nii.gz’[1]’
s104 SZ -1.39346 dr_stage2_subject00103_Z.nii.gz’[1]’
s105 SZ 1.22219 dr_stage2_subject00104_Z.nii.gz’[1]’
s106 SZ 0.00778 dr_stage2_subject00105_Z.nii.gz’[1]’
s107 SZ -0.08563 dr_stage2_subject00106_Z.nii.gz’[1]’
s108 SZ 1.03536 dr_stage2_subject00107_Z.nii.gz’[1]’
s109 SZ -1.76712 dr_stage2_subject00108_Z.nii.gz’[1]’
s110 SZ -1.86054 dr_stage2_subject00109_Z.nii.gz’[1]’
s111 SZ 1.22219 dr_stage2_subject00110_Z.nii.gz’[1]’
s112 SZ -0.83296 dr_stage2_subject00111_Z.nii.gz’[1]’
s113 SZ 0.47486 dr_stage2_subject00112_Z.nii.gz’[1]’
s114 SZ 0.1012 dr_stage2_subject00113_Z.nii.gz’[1]’
s115 SZ -1.30004 dr_stage2_subject00114_Z.nii.gz’[1]’
s116 SZ 0.56828 dr_stage2_subject00115_Z.nii.gz’[1]’
s117 SZ 0.56828 dr_stage2_subject00116_Z.nii.gz’[1]’
s118 SZ 0.1012 dr_stage2_subject00117_Z.nii.gz’[1]’
s119 SZ 1.12878 dr_stage2_subject00118_Z.nii.gz’[1]’
s120 SZ -1.11321 dr_stage2_subject00119_Z.nii.gz’[1]’
s121 SZ -1.11321 dr_stage2_subject00120_Z.nii.gz’[1]’
s122 SZ -0.55271 dr_stage2_subject00121_Z.nii.gz’[1]’
s123 SZ -1.30004 dr_stage2_subject00122_Z.nii.gz’[1]’
s124 SZ 0.75511 dr_stage2_subject00123_Z.nii.gz’[1]’
s125 SZ 0.19462 dr_stage2_subject00124_Z.nii.gz’[1]’
s126 SZ 1.12878 dr_stage2_subject00125_Z.nii.gz’[1]’
s127 SZ 0.28803 dr_stage2_subject00126_Z.nii.gz’[1]’
s128 SZ -1.30004 dr_stage2_subject00127_Z.nii.gz’[1]’
s129 SZ -0.4593 dr_stage2_subject00128_Z.nii.gz’[1]’

For the analysis with Age as a covariate, you need to use the following:

-bsVars “Grp*Age” \