AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
February 26, 2015 02:51PM
Gang,

Thank you for the feedback.

I'm having some issue trying to replicate the results from one voxel of a whole brain 3dLME analysis in SPSS and exclusively in R.

My model is a 2 factor repeated measures design with 1 within subject varying covariate.

If I try to run the below command in R

lme(values ~ time*treatment + ratings,data=lme_data,random = ~1 + ratings | subj)

I get the following error message:
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (10)

Here is the 3dLME equivalent? setup:
3dLME -prefix LME_Result' \
-model "time*treatment + ratings" \
-ranEff '~ 1 + ratings' \
-qvars 'ratings' \
-SS_type 3\
.
.
.

Is the R lme command line above the equivalent to the 3dLME model formula?

Just to simplify things, I tried to run lme without the covariate. Here is my model:
R_lme = lme(values ~ time*treatment ,data=lme_data, random = ~1 | subj)

3dLME equivalent setup:
3dLME -prefix LME_Result' \
-model "time*treatment " \
-ranEff '~ 1' \
-SS_type 3\

.
.
.
Is the R lme command line above the equivalent to the 3dLME model formula?


The results are different.

Running the LME in R: Here is my anova table from lme

anova.lme(R_lme)

numDF denDF F-value p-value
(Intercept) 1 112 0.000380997 0.9845
time 2 112 3.080942303 0.0498
treatment 2 112 10.352969615 0.0001
time:treatment 4 112 2.280583154 0.0650

3dLME result gives :

Intercept, 1 112 10.90502
Time main effect, df =2, 112 F = 2.357028, p = 0.0994
Treatment main effect, df = 2, 112 F = 8.43066, p = 0.00039
time*treatment interaction, df = 4, 112 F = 2.280609, p = 0.065

I get the same value for the time*treatment interaction, 2.281, but the treatment and time main effect F’s are different . Running the contrast in R using testInteraction between treatment1 vs treatment 2 yields the same results as 3dLME when not including the covariate. I am able to replicate the R lme results in SPSS too. Not sure what is going on. And why the main F's for 3dLME are different. What would account for the discrepancy in the results? Am I missing a small step in my analysis setup?

Here is the afni version we are using:

Precompiled binary linux_openmp_64: Feb 13 2015 (Version AFNI_2011_12_21_1014)

Michael.

Here is my model setup with the covariate included:
3dLME -prefix LME_Result' \
-model "time*treatment + ratings" \
-ranEff '~ 1 + ratings' \
-qvars 'ratings' \
-SS_type 3\
-num_glt 9 \
-gltLabel 1 treat1_vs_treat3 -gltCode 1 'treatment : 1*treat1 -1*treat3 ' \
-gltLabel 2 treat2_vs_treat3 -gltCode 2 'treatment : 1*treat2 -1*treat3 ' \
-gltLabel 3 treat1_vs_treat2 -gltCode 3 'treatment : 1*treat1 -1*treat2 ' \
-gltLabel 4 meanTime1 -gltCode 4 'time : 1*Time1 ' \
-gltLabel 5 meanTime2 -gltCode 5 'time : 1*Time2 ' \
-gltLabel 6 meanTime3 -gltCode 6 'time : 1*Time3 ' \
-gltLabel 7 meantreat1 -gltCode 7 'treatment : 1*treat1 ' \
-gltLabel 8 meantreat2 -gltCode 8 'treatment : 1*treat2 ' \
-gltLabel 9 meantreat3 -gltCode 9 'treatment : 1*treat3 ' \
-dataTable \
Subj time treatment ratings InputFile \
subj02 Time1 treat1 35.7037 Time1stats.subj02treat1file+tlrc \
subj02 Time1 treat2 -10.963 Time1stats.subj02treat2file+tlrc \
subj02 Time1 treat3 -4.2963 Time1stats.subj02treat3file+tlrc \
subj02 Time2 treat1 19.03704 Time2stats.subj02treat1file+tlrc \
subj02 Time2 treat2 -7.62963 Time2stats.subj02treat2file+tlrc \
subj02 Time2 treat3 -5.96296 Time2stats.subj02treat3file+tlrc \
subj02 Time3 treat1 19.03704 Time3stats.subj02treat1file+tlrc \
subj02 Time3 treat2 -9.2963 Time3stats.subj02treat2file+tlrc \
subj02 Time3 treat3 12.37037 Time3stats.subj02treat3file+tlrc \
subj09 Time1 treat1 -8.96296 Time1stats.subj09treat1file+tlrc \
subj09 Time1 treat2 7.037037 Time1stats.subj09treat2file+tlrc \
subj09 Time1 treat3 -7.62963 Time1stats.subj09treat3file+tlrc \
subj09 Time2 treat1 -10.963 Time2stats.subj09treat1file+tlrc \
subj09 Time2 treat2 -14.2963 Time2stats.subj09treat2file+tlrc \
subj09 Time2 treat3 -14.2963 Time2stats.subj09treat3file+tlrc \
subj09 Time3 treat1 25.7037 Time3stats.subj09treat1file+tlrc \
subj09 Time3 treat2 -14.2963 Time3stats.subj09treat2file+tlrc \
subj09 Time3 treat3 -7.62963 Time3stats.subj09treat3file+tlrc \
subj11 Time1 treat1 0.703704 Time1stats.subj11treat1file+tlrc \
subj11 Time1 treat2 22.37037 Time1stats.subj11treat2file+tlrc \
subj11 Time1 treat3 -2.62963 Time1stats.subj11treat3file+tlrc \
subj11 Time2 treat1 9.037037 Time2stats.subj11treat1file+tlrc \
subj11 Time2 treat2 -10.963 Time2stats.subj11treat2file+tlrc \
subj11 Time2 treat3 12.37037 Time2stats.subj11treat3file+tlrc \
subj11 Time3 treat1 -11.6296 Time3stats.subj11treat1file+tlrc \
subj11 Time3 treat2 0.703704 Time3stats.subj11treat2file+tlrc \
subj11 Time3 treat3 -5.96296 Time3stats.subj11treat3file+tlrc \
subj15 Time1 treat1 -11.6296 Time1stats.subj15treat1file+tlrc \
subj15 Time1 treat2 -14.2963 Time1stats.subj15treat2file+tlrc \
subj15 Time1 treat3 -14.2963 Time1stats.subj15treat3file+tlrc \
subj15 Time2 treat1 35.7037 Time2stats.subj15treat1file+tlrc \
subj15 Time2 treat2 2.37037 Time2stats.subj15treat2file+tlrc \
subj15 Time2 treat3 -4.2963 Time2stats.subj15treat3file+tlrc \
subj15 Time3 treat1 12.37037 Time3stats.subj15treat1file+tlrc \
subj15 Time3 treat2 5.703704 Time3stats.subj15treat2file+tlrc \
subj15 Time3 treat3 -7.62963 Time3stats.subj15treat3file+tlrc \
subj17 Time1 treat1 12.37037 Time1stats.subj17treat1file+tlrc \
subj17 Time1 treat2 -1.96296 Time1stats.subj17treat2file+tlrc \
subj17 Time1 treat3 5.703704 Time1stats.subj17treat3file+tlrc \
subj17 Time2 treat1 -13.6296 Time2stats.subj17treat1file+tlrc \
subj17 Time2 treat2 10.7037 Time2stats.subj17treat2file+tlrc \
subj17 Time2 treat3 -9.2963 Time2stats.subj17treat3file+tlrc \
subj17 Time3 treat1 -7.62963 Time3stats.subj17treat1file+tlrc \
subj17 Time3 treat2 -5.96296 Time3stats.subj17treat2file+tlrc \
subj17 Time3 treat3 -10.963 Time3stats.subj17treat3file+tlrc \
subj20 Time1 treat1 40.75556 Time1stats.subj20treat1file+tlrc \
subj20 Time1 treat2 5.755556 Time1stats.subj20treat2file+tlrc \
subj20 Time1 treat3 -10.9111 Time1stats.subj20treat3file+tlrc \
subj20 Time2 treat1 22.42222 Time2stats.subj20treat1file+tlrc \
subj20 Time2 treat2 -4.24444 Time2stats.subj20treat2file+tlrc \
subj20 Time2 treat3 -12.5778 Time2stats.subj20treat3file+tlrc \
subj20 Time3 treat1 9.088889 Time3stats.subj20treat1file+tlrc \
subj20 Time3 treat2 -6.91111 Time3stats.subj20treat2file+tlrc \
subj20 Time3 treat3 22.42222 Time3stats.subj20treat3file+tlrc \
subj25 Time1 treat1 -7.57778 Time1stats.subj25treat1file+tlrc \
subj25 Time1 treat2 14.08889 Time1stats.subj25treat2file+tlrc \
subj25 Time1 treat3 -15.9111 Time1stats.subj25treat3file+tlrc \
subj25 Time2 treat1 -9.24444 Time2stats.subj25treat1file+tlrc \
subj25 Time2 treat2 -17.5778 Time2stats.subj25treat2file+tlrc \
subj25 Time2 treat3 -17.2444 Time2stats.subj25treat3file+tlrc \
subj25 Time3 treat1 29.08889 Time3stats.subj25treat1file+tlrc \
subj25 Time3 treat2 -14.2444 Time3stats.subj25treat2file+tlrc \
subj25 Time3 treat3 -10.9111 Time3stats.subj25treat3file+tlrc \
subj29 Time1 treat1 5.755556 Time1stats.subj29treat1file+tlrc \
subj29 Time1 treat2 15.75556 Time1stats.subj29treat2file+tlrc \
subj29 Time1 treat3 -5.91111 Time1stats.subj29treat3file+tlrc \
subj29 Time2 treat1 9.088889 Time2stats.subj29treat1file+tlrc \
subj29 Time2 treat2 -9.24444 Time2stats.subj29treat2file+tlrc \
subj29 Time2 treat3 5.755556 Time2stats.subj29treat3file+tlrc \
subj29 Time3 treat1 -19.2444 Time3stats.subj29treat1file+tlrc \
subj29 Time3 treat2 9.088889 Time3stats.subj29treat2file+tlrc \
subj29 Time3 treat3 -9.24444 Time3stats.subj29treat3file+tlrc \
subj36 Time1 treat1 -12.5778 Time1stats.subj36treat1file+tlrc \
subj36 Time1 treat2 -20.9111 Time1stats.subj36treat2file+tlrc \
subj36 Time1 treat3 -18.5778 Time1stats.subj36treat3file+tlrc \
subj36 Time2 treat1 22.42222 Time2stats.subj36treat1file+tlrc \
subj36 Time2 treat2 22.42222 Time2stats.subj36treat2file+tlrc \
subj36 Time2 treat3 -4.24444 Time2stats.subj36treat3file+tlrc \
subj36 Time3 treat1 17.42222 Time3stats.subj36treat1file+tlrc \
subj36 Time3 treat2 25.75556 Time3stats.subj36treat2file+tlrc \
subj36 Time3 treat3 -10.9111 Time3stats.subj36treat3file+tlrc \
subj37 Time1 treat1 2.422222 Time1stats.subj37treat1file+tlrc \
subj37 Time1 treat2 -5.91111 Time1stats.subj37treat2file+tlrc \
subj37 Time1 treat3 9.088889 Time1stats.subj37treat3file+tlrc \
subj37 Time2 treat1 -13.2444 Time2stats.subj37treat1file+tlrc \
subj37 Time2 treat2 17.42222 Time2stats.subj37treat2file+tlrc \
subj37 Time2 treat3 -15.9111 Time2stats.subj37treat3file+tlrc \
subj37 Time3 treat1 -5.91111 Time3stats.subj37treat1file+tlrc \
subj37 Time3 treat2 -9.24444 Time3stats.subj37treat2file+tlrc \
subj37 Time3 treat3 -17.5778 Time3stats.subj37treat3file+tlrc \
subj38 Time1 treat1 29.92593 Time1stats.subj38treat1file+tlrc \
subj38 Time1 treat2 3.259259 Time1stats.subj38treat2file+tlrc \
subj38 Time1 treat3 -10.0741 Time1stats.subj38treat3file+tlrc \
subj38 Time2 treat1 34.92593 Time2stats.subj38treat1file+tlrc \
subj38 Time2 treat2 -6.74074 Time2stats.subj38treat2file+tlrc \
subj38 Time2 treat3 -10.0741 Time2stats.subj38treat3file+tlrc \
subj38 Time3 treat1 13.25926 Time3stats.subj38treat1file+tlrc \
subj38 Time3 treat2 -8.40741 Time3stats.subj38treat2file+tlrc \
subj38 Time3 treat3 6.592593 Time3stats.subj38treat3file+tlrc \
subj42 Time1 treat1 -15.0741 Time1stats.subj42treat1file+tlrc \
subj42 Time1 treat2 14.92593 Time1stats.subj42treat2file+tlrc \
subj42 Time1 treat3 -18.4074 Time1stats.subj42treat3file+tlrc \
subj42 Time2 treat1 -6.74074 Time2stats.subj42treat1file+tlrc \
subj42 Time2 treat2 -18.4074 Time2stats.subj42treat2file+tlrc \
subj42 Time2 treat3 -19.7407 Time2stats.subj42treat3file+tlrc \
subj42 Time3 treat1 33.25926 Time3stats.subj42treat1file+tlrc \
subj42 Time3 treat2 -6.74074 Time3stats.subj42treat2file+tlrc \
subj42 Time3 treat3 -13.4074 Time3stats.subj42treat3file+tlrc \
subj43 Time1 treat1 11.59259 Time1stats.subj43treat1file+tlrc \
subj43 Time1 treat2 29.92593 Time1stats.subj43treat2file+tlrc \
subj43 Time1 treat3 -8.40741 Time1stats.subj43treat3file+tlrc \
subj43 Time2 treat1 9.925926 Time2stats.subj43treat1file+tlrc \
subj43 Time2 treat2 -8.40741 Time2stats.subj43treat2file+tlrc \
subj43 Time2 treat3 13.25926 Time2stats.subj43treat3file+tlrc \
subj43 Time3 treat1 -18.0741 Time3stats.subj43treat1file+tlrc \
subj43 Time3 treat2 8.259259 Time3stats.subj43treat2file+tlrc \
subj43 Time3 treat3 -11.7407 Time3stats.subj43treat3file+tlrc \
subj44 Time1 treat1 -12.7407 Time1stats.subj44treat1file+tlrc \
subj44 Time1 treat2 -23.4074 Time1stats.subj44treat2file+tlrc \
subj44 Time1 treat3 -9.74074 Time1stats.subj44treat3file+tlrc \
subj44 Time2 treat1 26.59259 Time2stats.subj44treat1file+tlrc \
subj44 Time2 treat2 3.259259 Time2stats.subj44treat2file+tlrc \
subj44 Time2 treat3 -6.74074 Time2stats.subj44treat3file+tlrc \
subj44 Time3 treat1 28.25926 Time3stats.subj44treat1file+tlrc \
subj44 Time3 treat2 16.59259 Time3stats.subj44treat2file+tlrc \
subj44 Time3 treat3 -11.7407 Time3stats.subj44treat3file+tlrc \
subj47 Time1 treat1 6.592593 Time1stats.subj47treat1file+tlrc \
subj47 Time1 treat2 -6.74074 Time1stats.subj47treat2file+tlrc \
subj47 Time1 treat3 13.25926 Time1stats.subj47treat3file+tlrc \
subj47 Time2 treat1 -11.7407 Time2stats.subj47treat1file+tlrc \
subj47 Time2 treat2 11.59259 Time2stats.subj47treat2file+tlrc \
subj47 Time2 treat3 -16.7407 Time2stats.subj47treat3file+tlrc \
subj47 Time3 treat1 -13.4074 Time3stats.subj47treat1file+tlrc \
subj47 Time3 treat2 -8.40741 Time3stats.subj47treat2file+tlrc \
subj47 Time3 treat3 -13.4074 Time3stats.subj47treat3file+tlrc
Subject Author Posted

3dLME - 2 within-subjects factors + covariate?

mrif February 23, 2015 02:03PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang February 23, 2015 02:33PM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif February 24, 2015 01:17PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang February 24, 2015 02:49PM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif February 26, 2015 02:51PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang February 27, 2015 10:05AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 02, 2015 11:11AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 08, 2015 02:11PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 09, 2015 10:40AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 10, 2015 02:24PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 11, 2015 09:45AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 11, 2015 11:44AM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 11, 2015 06:10PM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 11, 2015 07:46PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 12, 2015 11:57AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 12, 2015 12:48PM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 12, 2015 04:13PM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 13, 2015 10:09AM

Re: 3dLME - 2 within-subjects factors + covariate?

gang March 14, 2015 10:21AM

Re: 3dLME - 2 within-subjects factors + covariate?

mrif March 15, 2015 11:23PM