3dttest++ One Sample ttest Covariates

Dear AFNI experts,

I used the below script to run a one-sample t-test.

3dttest++
-prefix results
-covariates Covariate.txt
-center SAME
-mask /Volumes/GM_mask/GMmask+tlrc
-clustsim
-setA A
subj1 /Volumes/subj1/Proc_results/nbm_final_r2z+tlrc
subj2 /Volumes/subj2/Proc_results/nbm_final_r2z+tlrc
subj3 /Volumes/subj3/Proc_results/nbm_final_r2z+tlrc
subj4 /Volumes/subj4/Proc_results/nbm_final_r2z+tlrc
subj5 /Volumes/subj5/Proc_results/nbm_final_r2z+tlrc
sub6 /Volumes/subj6/Proc_results/nbm_final_r2z+tlrc
.
.
.
.
subj180 /Volumes/subj180/Proc_results/nbm_final_r2z+tlrc \

There were three covariates (age, sex, and years of education) and the ouput dataset looks like below.
#0 A_mean
#1 A_Zscr
#2 A_age
#3 A_age_Zscr
#4 A_sex
#5 A_sex_Zscr
#6 A_education
#7 A_education_Zscr

I’d like to see the one-sample t-test result after controlling for all the covariates, not each covariate, but according to the 3dttest++ page, #0 is a difference of means with covariates removed. Could you please let me know if there is any way that I can get the one-sample t-test result after controlling all three covariates?

Best,
JW

JW,

How was sex presented in the table Covariate.txt? If it was coded as -1 and 1 (or something similar), #0 A_mean is what you’re looking for.

Hi Gang,

Thanks for the reply! It was coded as 1 and 2. Could you please let me know that if I need to rerun after coding it (sex) as -1 and 1?

Best,
JW

JW,

When you quantitatively code the variable ‘sex’, I assume that you have one set (setA). In that case, I’m not so sure how ‘-center SAME’ would behave. If it still removes the mean of your coding with 1 and 2, it might be OK. But you would have to double check.

Hi Gang,

Thanks for the advice. I’ll double-check.

Best,
JW