I would like to extract the slopes for each individual in a mixed effect model, as outlined in the following paragraph
Mixed effects models were used to characterize individual paths of change in the cognitive summary measures, including terms for age, sex, and years of education as fixed effects (Laird and Ware, 1982; Wilson et al., 2000, 2002c).... Residual, individual cognitive decline slope terms were extracted from the mixed models, after adjustment for the effects of age, sex, and education. Person-specific, adjusted residual slopes were then used as a quantitative outcome phenotype for the genetic association analyses. These estimates equate to the difference between an individual’s slope and the predicted slope of an individual of the same age, sex, and education level.
De Jager, P. L., Shulman, J. M., Chibnik, L. B., Keenan, B. T., Raj, T., Wilson, R. S., et al. (2012). A genome-wide scan for common variants affecting the rate of age-related cognitive decline. Neurobiology of Aging, 33(5), 1017.e1–1017.e15.
I have looked at using the
coef function to extract the coefficients for each individual, but I am unsure if this is the correct approach to be using.
Can anyone provide some advice on how to do this?
#example R code library(lme4) attach(sleepstudy) fml <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy) beta <- coef(fml)$Subject colnames(beta) <- c("Intercept", "Slope") beta summary(beta) summary(fm1)