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)
line breaks in command -global-Dear all,How can I break line in the command -global-.I use "///" ,but I get error.My codes in dofil…
Plot different characterisitics of an observationDear Stata-community, I am using Stata 16. I have a dataset with peace agreements, their duration, a…
Rearrange panel data in STATADear all, I have several datasets I would like to merge, however, they are set up differently. What…
Simple table outputDear STATA users, I want a simple table output in word, however i can't seem to create it by just S…
Printing out balance tableEDIT: Formatting of tables and code in this post got messed up. View my post below to see correct fo…
Subscribe to:
Post Comments (Atom)
0 Response to Random slopes for categorical variable (3 groups)
Post a Comment