# var-cov structure 3dLME

Dear AFNI experts,

I was wondering what the default var-cov structure is in 3dLME.

I’d like to specify an unstructured var-cov matrix for my analyses, and I think know how to do this, but just to be sure I’d like to run it by you. My model has the following variables: 1 GROUP variable, 3 within subject repeated measures (W1-3) and 1 covariate (COV):

-model “GROUP * W1 * W2 * W3 + COV” -qVars “COV”
-ranEff “~1”
-corStr “corSymm(form=~1|Subj)”\

Do you agree that this is the correct way of specifying my model with an unstructured cov-var matrix? And do I understand correctly that ranEff ~1 is being converted to ~1|Subj automatically by 3dLME?

Best
Hans

3 within subject repeated measures (W1-3) and 1 covariate (COV)

Is the covariate COV a within-subject or between-subject variable? How many levels does each of the three factors W1-W3 have?

COV (mean framewise displacement) is (I believe) a within-subject variable. Group is the only between-subj variable.
W1 (visit), W2 (phase of the HRF), and W3 (congruency for stimuli within task conditions) all have two levels.

Thanks,

Best
Hans

Hi Gang,

We have also been diving into the 3dLME code a bit, and we might be wrong, but does the algorithm always default to AR1 if we specify corStr (not matter which structure)? Is it possible to specify corSymm instead of corAR1? We seem to be getting identical results for both.

Best
Hans

COV (mean framewise displacement) is (I believe) a within-subject variable.

So, COV varies across the combinations among the three factors W1-3 for each subject?

Is it possible to specify corSymm instead of corAR1?

corSymm() is used to specify the variance-covariance structure in the residuals. I would not worry too much about the residuals. Instead, it might make sense to try

-ranEff “~1+COV”

So, COV varies across the combinations among the three factors W1-3 for each subject?

Yes, COV varies for the two levels of W1 (visit 1 and visit 2). This means that COV is the same for the levels of W2 and W3 per level of W1 (visit).

corSymm() is used to specify the variance-covariance structure in the residuals. I would not worry too much about the residuals. Instead, it might make sense to try
-ranEff “~1+COV”

I’m afraid that I’m still a bit puzzled. Why should we not worry about the var-cov structure of the residuals? And what are we actually specifying if we use ranEff “~1+COV”?
We would like to adequately specify our repeated measures across the within subject variables W1 - W3. We see a big difference between the default settings, and specifying a structure under corStr, and also noticed that no matter what we specify under corStr, it results in the use of AR1 in the code, but we might be wrong. We think an unstructured matrix suits our data the best, but we are not sure how to set this up in 3dLME (but we know how to do it using R’s lme). Any additional help/info would be highly appreciated.

Thanks,

Best
Hans

Hi Gang,

I’d like to give you a little more details.
Our unstructured (var-cov structure) model is as follows:

-model “DXVISITPHASE*CONGRUENCY+meanFD” -qVars “meanFD”
-ranEff “~1”
-corStr “corSymm(form=~1|Subj)”\

Our model with AR1 is:

-model “DXVISITPHASE*CONGRUENCY+meanFD” -qVars “meanFD”
-ranEff “~1”
-corStr “corAR1(form=~1|Subj)”\

These models yield identical results for all effects and interactions. The results are, however, different (less extensive) compared to those obtained using the default settings when we do not specify corStr.

It seems that in the 3dLME code, all corStr specifications (no matter what we specify) would default to AR1. The default setting (without specifying anything) is NULL (default in R’s lme), which is I believe compound symmetry.

We would like to specify an unstructured matrix since this would be consistent with other ROI based mixed models. We have a large dataset (two groups of both 150+ subjects).

We really appreciate your help in this. Thanks!

Best
Hans

Hans,

The option -corStr in 3dLME was added solely for the purpose of capturing the temporal correlation (i.e., AR1) when hemodynamic response curve is the input. So, any other structures for residuals are not supported at the moment.

My experience seems to show that, under most circumstances, fine-tuning fixed- and random-effects are more crucial than the residuals. For example, I might try something along the line-

3dLMEr …
-model “DXVISITPHASE*CONGRUENCY+meanFD+(1|VISIT:Subj)+(1|PHASE:Subj)+(1|CONGRUENCY:Subj)+(meanFD|Subj)”
-qVars “meanFD”