I have a dataset in which individuals were assessed at two time points during the study on a cognitive test, as such I was wondering which statistical model would be more appropriate for my data, either linear regression or mixed effects models?

The average length of follow up for my data is 59 months with a standard deviation of 43.03 (range is 0.63-167 months) with 88 (33%) of people having data for only one time point.

For linear regression, the approach I was thinking utilising was taking the delta of the test score between the two time points and regressing that against time (months between test scores).

If I used mixed effects models, the main issue I have is how to handle individuals who have only wave of data? While I know mixed effects models are especially robust in regards to the analysis of unbalanced data, would 33% missingnes cause issues?

Just sample R code highlighting the output using either linear regression or mixed models.

fm1 <- lm(mmse_difference ~ mmse_months_between*ORgrs_apoe, data = dat.wide)

lm(formula = mmse_difference ~ mmse_months_between * ORgrs_apoe, 
    data = newdat)

    Min      1Q  Median      3Q     Max 
-20.960  -3.957   1.854   5.200  12.550 

                               Estimate Std. Error t value Pr(>|t|)
(Intercept)                    -2.74185    2.20667  -1.243    0.216
mmse_months_between            -0.01768    0.03051  -0.579    0.563
ORgrs_apoe                      0.35163    1.17782   0.299    0.766
mmse_months_between:ORgrs_apoe -0.01973    0.01748  -1.129    0.261

Residual standard error: 7.3 on 170 degrees of freedom
  (88 observations deleted due to missingness)
Multiple R-squared:  0.08481,   Adjusted R-squared:  0.06866 
F-statistic: 5.251 on 3 and 170 DF,  p-value: 0.001725
Num. obs. 174

fm2 <- lme(mmse ~ mmse_months*ORgrs_apoe, random = ~mmse_months|patientid, data = dat.long, method = "ML", na.action = na.exclude)
Linear mixed-effects model fit by maximum likelihood
 Data: dat.long 
       AIC      BIC    logLik
  2797.467 2829.537 -1390.733

Random effects:
 Formula: ~mmse_months | patientid
 Structure: General positive-definite, Log-Cholesky parametrization
            StdDev    Corr  
(Intercept) 7.2972822 (Intr)
mmse_months 0.1132399 0.85  
Residual    2.9431616       

Fixed effects: mmse ~ mmse_months * ORgrs_apoe 
                           Value Std.Error  DF   t-value p-value
(Intercept)            24.635821 1.0959420 231 22.479130  0.0000
mmse_months            -0.069918 0.0223198 172 -3.132544  0.0020
ORgrs_apoe             -1.283348 0.6062892 231 -2.116726  0.0354
mmse_months:ORgrs_apoe -0.024952 0.0130561 172 -1.911103  0.0577
                       (Intr) mms_mn ORgrs_
mmse_months             0.438              
ORgrs_apoe             -0.882 -0.377       
mmse_months:ORgrs_apoe -0.357 -0.891  0.397

Standardized Within-Group Residuals:
        Min          Q1         Med          Q3         Max 
-3.48643949 -0.31734164  0.07636708  0.26575764  2.49901891 

Number of Observations: 407
Number of Groups: 233 


  • $\begingroup$ A mixed model is a regression model. It would also be useful to know what the goals of your analysis are. If you want to make individual level inferences, you may want to consider mixed/hierarchical models. If not, you might consider generalized estimating equations. $\endgroup$ – StatsStudent Apr 14 '15 at 7:20
  • $\begingroup$ However, I'm not quite sure from the description of your problem why you'd want to use a mixed model. You haven't provided any information why you think it would be appropriate here. Based on the limited information you have given, I just model the differences between the baseline and follow-up measurements. $\endgroup$ – StatsStudent Apr 14 '15 at 7:25

If you limit yourself to a frequentist framework for the change analysis, then study participants with only 1 observation will be eliminated. An alternative might be to switch to a Bayesian framework where individuals with only a single observed period in a multiperiod model do not represent a limitation. See chapter 13 of Gelman and Hill's book Data Analysis Using Regression and Multilevel/Hierarchical Modeling.


I recommend to perform multiple imputation (eg with mice in R), and then use a mixed model or generalizing estimating equations, explicitly recognizing the clustering features.

Reliance on multiple imputation according to Rubin approach will force you to recognize the uncertainty due to missingness without discarding potentially useful observations.


After reviewing this paper

Peugh, J. L. (2010). A practical guide to multilevel modeling. Journal of School Psychology. Retrieved from http://www.sciencedirect.com/science/article/pii/S0022440509000545

A potential answer for this question can be obtained by calculating the ICC and design effect (DE), which can be used to quantify the amount of between group variation and need the for using multilevel modeling.

ICC is defined as: level 2 variance/(level 2 variance + level 1 variance)

DE is defined as: 1 + (Average number of individuals in each group - 1) x ICC.

So for the reduced models I presented in my question this would be

fm1 <- lme(mmse ~ 1, random = ~1|patientid, data = dat.long, method = "ML", na.action = na.exclude)
Linear mixed-effects model fit by maximum likelihood
  Data: dat.long 
  Log-likelihood: -1459.29
  Fixed: mmse ~ 1 

Random effects:
 Formula: ~1 | patientid
        (Intercept) Residual
StdDev:    6.526672 6.583354

Number of Observations: 407
Number of Groups: 233 

patientid = pdLogChol(1) 
            Variance StdDev  
(Intercept) 42.59744 6.526672
Residual    43.34054 6.583354

Calculating the ICC indicates that 49% of response variables variance occurred between individuals.

> 42.60/(42.60 + 43.34)
[1] 0.4956947

For the DE, the paper above indicates that a DE greater then 2 indicates the need to use a multilevel model, however for the model above the DE is 1.37, so a multilevel model may not be needed for this data.

> 1+((407/233)-1)*(42.60/(42.60 + 43.34))
[1] 1.370175
  • $\begingroup$ Check here - ICC is not a good criterion for a decision on including random effects. $\endgroup$ – Tim Jan 10 '15 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.