I have unbalanced panel data with repeated sampling over 6 years, hence I am employing mixed linear regressions. I want to incorporate various covariates, which differ either at level 1 (observation level) or level 2 (individual level). I want to assess the effect of reading on cognitive test scores in later life. My level 1 predictors are, among others, age, wealthgroup, and the spread between observations due to the unbalanced nature. The level 1 predictors may change over time within each individual. Mylevel 2 predictors are constant for each individual and are education level and gender. My code for the mixed model with the random intercept is
Code:
mixed testscore reading age wealthgroup spread education gender || mergeid_num:,
Code:
mixed testscore reading age wealthgroup spread education gender || mergeid_num: spread, covariance(unstructured)
Code:
mixed testscore reading age wealthgroup spread education gender || mergeid_num: spread age wealthgroup, covariance(unstructured)
2. Does it make sense to add multiple slopes?
3. If I cannot/should not add multiple random slopes, how do I deal with the fact that my level 1 predictors vary over time?
Thanks all!
0 Response to Multiple random slopes in a mixed linear model
Post a Comment