Dear Stata experts,
I'm trying to fit a random slope model for longitudinal dataset. My dependent variable is continous variable and my independent variable was continous but I've converted into tertiles. I need a random slope for each tertile. Also, I've a time variable to adjust for which is continous as well. When I prefix R for the Y variable in random slope part, it doesn't run appropriately. Can you pleaes guide on how to get a slope for each tertiles? Also, I need to add in interaction between time and Y varible (tertile).
Thank you!
Here's my code: [mixed X i.Y time || ptid: R.Y]
Related Posts with Random slopes for categorical variable (3 groups)
STATA SE 13, how to get r square after mi estimateDear STATA users, is there a way to obtain R square (model fit statistics) after conducting mice? I…
Income Elasticity with Logit ModelHi, This is my model: Code: logit smoker lninc Where lninc, is the log transformation of the in…
xtabond2Dear all, I am running some dynamic panel data with xtabond2, and often the coefficients of the lagg…
Assigning a result from summarize to a variableHi everyone, I want to sum a variable and then assign its highest value +1 to an observation. The v…
Individual-invariant variables in FEHello, I am sorry if this topic has come up before - however, I did searched for an answer and faile…
Subscribe to:
Post Comments (Atom)
0 Response to Random slopes for categorical variable (3 groups)
Post a Comment