External Email - Use Caution
We are working in Matlab to analyze longitudinal data using the mass-univariate approach to Linear Mixed Effects (LME) Modeling.
Step 1: Below is the design matrix (first few rows) we created in an effort to compare subjects with low, moderate, and high drinking behavior with respect to time (3 groups).
1 0 1 0 0 0 0 0 1 3.0 1 3.0 0 0 0 0 1 0 1 0 0 0 0 0 1 1.2 0 0 1 1.2 0 0 1 2.3 0 0 0 0 1 2.3 1 3.5 0 0 0 0 1 3.5 1 0 1 0 0 0 0 0
Column 1 - intercept ones; 2 - time (years since baseline scan); 3 - low drinking group; 4 - low drinking x time; 5 - mod drinking group; 6 - mod drinking x time; 7 - high drinking group; 8 - high drinking x time
Step 2: To compare low/moderate drinking, mod/high drinking, and low/high drinking, we created the contrast matrix below:
CM=[0 0 0 1 0 -1 0 0; 0 0 0 0 0 1 0 -1; 0 0 0 1 0 0 0 -1]
Row 1 - low/mod drinking; Row 2 - mod/high drinking; Row 3 - low/high drinking
Please let us know if the contrast matrix is appropriate for our design matrix and the comparisons we would like to make. This seems incorrect since there is only one output from "lme_mass_F(lhstats,CM);"
Thank you for your help.
External Email - Use Caution
Hi Courtney,
I have two general remarks:
1.) For comparing n groups, the general rule is to have (n-1) binary indicator variables (and possibly n-1 interaction variables). One group (a reference group) will be implictly modeled by the intercept (1) and time (2) regressors. As a consequence, you should drop one group regressor and one interaction regressor from your design matrix (assuming that you have exactly 3 groups). As an analogy to your analysis, consider the example given on the Freesurfer LME tutorial page where there are 4 groups (HC, sMCI, cMCI, AD), but only 3 group indicators (sMCI, cMCI, AD) and 3 interaction terms. HC is chosen as the reference group in this example and not explicitly modeled.
2.) Any single (possibly multi-row) contrast matrix is expected to give only one single result, i.e. one F- and p-value. For example, a classical F-contrast that tests whether or not there is a difference between *any* pair of (more than 2) groups would be specified as a multi-row contrast matrix. To test for a difference between a specific pairs of groups, use a single-row contrast matrix (more precisely, vector).
Best regards,
Kersten
On Mi, 2018-07-25 at 16:19 +0200, Courtney Haswell wrote:
External Email - Use Caution
We are working in Matlab to analyze longitudinal data using the mass- univariate approach to Linear Mixed Effects (LME) Modeling.
Step 1: Below is the design matrix (first few rows) we created in an effort to compare subjects with low, moderate, and high drinking behavior with respect to time (3 groups).
1 0 1 0 0 0 0 0 1 3.0 1 3.0 0 0 0 0 1 0 1 0 0 0 0 0 1 1.2 0 0 1 1.2 0 0 1 2.3 0 0 0 0 1 2.3 1 3.5 0 0 0 0 1 3.5 1 0 1 0 0 0 0 0
Column 1 - intercept ones; 2 - time (years since baseline scan); 3 - low drinking group; 4 - low drinking x time; 5 - mod drinking group; 6 - mod drinking x time; 7 - high drinking group; 8 - high drinking x time
Step 2: To compare low/moderate drinking, mod/high drinking, and low/high drinking, we created the contrast matrix below:
CM=[0 0 0 1 0 -1 0 0; 0 0 0 0 0 1 0 -1; 0 0 0 1 0 0 0 -1]
Row 1 - low/mod drinking; Row 2 - mod/high drinking; Row 3 - low/high drinking
Please let us know if the contrast matrix is appropriate for our design matrix and the comparisons we would like to make. This seems incorrect since there is only one output from "lme_mass_F(lhstats,CM);"
Thank you for your help.
freesurfer@nmr.mgh.harvard.edu