# How many observations per subject are necessary to fit a random slope in a mixed model?

I am working on a project that collected data retrospectively on subjects. There are subjects with multiple points of follow up per person, anywhere from 1 to 3 measurements. The timing of such measurements is extremely variable. Most subjects have 1 measurement, but many have 2 or 3. We are interested in the population trend over time, and would like to use all possible data.

Is it appropriate to use a mixed model with a random slope for time to analyze data with this structure? I see no intuitive problem with fitting a random intercept model. However, for the people with a single measurement, how is the random slope estimated? If most subjects have only 2 or 3 measurements, is the random slope even possible (or recommended) or is this overfitting the data?

• If you're interested in population trends, have you considered using a GEE instead? – AdamO Jun 12 '13 at 17:14
• Honestly, no, but out of ignorance. My statistical training did not cover GEE in depth. However, as I understand them, if I fit a linear mixed model with a random intercept vs. a GEE with a compound symmetry covariance structure, these are the same models, no? And so I could specify a different covariance structure with the GEE, but not sure what other benefit it would provide. And in linear models, are the interpretations of the fixed effects not the same? – rjweyant Jun 12 '13 at 20:00
• GEE is not a mixed effects model, they estimate different parameters. The repeated measures ANOVA and GEE with compound symmetry are very similar as you noted, but GEE estimates marginal effects while mixed models estimate conditional ones. The interpretation is thus different, for a GEE the $\beta_M$ is an: "associated difference in the outcome among individuals having a unit difference in predictor" whereas mixed models say $\beta_C$ is an "associated difference in the outcome for an individual having a unit difference in the predictor." – AdamO Jun 12 '13 at 20:30

In a basic mixed effects model,

$$E[Y_{it}|X_{it}] = \alpha + \sigma_i^2 + \beta X_{it}$$

clusters having just one observation contribute influence to both the estimated variance of the random effect and the slope of the fixed effect. This is because the random intercept is never actually estimated. While some numerical solvers produce estimates for random intercepts, they are actually post-hoc statistics calculated after joint estimation of the random effect variance and the fixed effect slope.

If you fit mixed effects models with unbalanced designs, it's important to verify the normality of these estimates (this can be a strong and influential assumption when there are a small number of clusters). As an example, suppose I run a health care clinic and we're verifying the management of AIDS in subjects on antiretroviral therapies, such as effivirenz. If I combine prevalent cases at baseline and incident cases during follow-up, my analysis is now sensitive to the distribution of incidence. For instance, suppose 70% of my cases were diagnosed two years ago, and have had successful management of disease while 30% of my cases are incident and have high viral loads before starting therapy. I now have an uneven bimodal distribution of random intercepts (viral load at "visit 1") and my fixed effect is biased toward the null (when it's actually suggestive that it's effective in managing disease).

A GEE on the other hand makes no assumption about the distribution of random effects and is consistent for the population averaged effect estimate: $\beta_M$ (M for marginal) rather than $\beta_C$ (C for conditional). These models are related to one another, but on average $\beta_M \leq \beta_C$ yet tests of inference about $\beta_M$ can often be of higher power.

• OK, but with mixed models, can you not also estimate the marginal effect? Isn't this the difference between the β's and the b's, E[Y] vs E[Y|b]? – rjweyant Jun 13 '13 at 14:10
• Also, thank you! but I think the interpretation distinction is still not entirely clear. Isn't population vs individual interpretation the difference between the fixed effects versus the random effects? And if we are in the situation where the assumptions about the normality of the random effect are met, with a large number of clusters, then these methods produce similar estimates for the fixed effects, it's just a question of how we specify the covariance structure? – rjweyant Jun 13 '13 at 14:23
• Q1: population avg effects vs. individual effects equivalent to fixed vs. random effects? A1: NO. fixed effects are individual level parameter estimates, random effects (or random intercepts) is the random variable describing distribution of individual intercepts in the population (due to infinite unobserved variables & CLT usu. a normal RV). Q2: If normality of random effects is true and we correctly specify covariance structure, aren't individual level and population level effects the same? A2: Only when the mean model is true and under heteroscedasticity. Otherwise, they're usu different. – AdamO Jun 13 '13 at 16:58
• Ref: "Longitudinal Data Analysis" Diggle Heagerty Zeger Liang – AdamO Jun 13 '13 at 16:59