Hello,
I am working on a study where a group of individuals have a CT scan for a specific measurement (let's call it ct) at baseline (t0), then at 2 more follow-up (t1 and t2). The interval for follow-up was not uniform across individuals, and the time between t0 and subsequent followups is represented by variable time (a continuous variable). These individuals are assigned into 3 groups based on their comorbidities, age, etc, which is represented by variable group (values 1, 2, 3). Each individual is assigned a number (id). There are covariates but let's simplify things by just putting one for now (covar).
I am interested in comparing the change in ct over time between groups, which, as I understand, can be done with the following code to allow for random effects at the individual level (there is no reason to suspect random slopes I think):
from which the coefficient, 95% CI and p-value for the i.group#c.time will be what I am looking for primarily, i.e. how groups 2 and 3 compare to group 1 in terms of the rate ofchange in ct over time, respectively.
However, I also want to report the mean estimated rate of change in ct (per unit time) for each group, i.e. not only the difference between groups, but also the absolute value of the mean rate of change for each group. I suspect this can be done using something under the 'predict' postestimation command, but what should the code be? I'm admittedly not familiar with postestimation commands here so would appreciate expert help around here. (Of course, if any of the above is incorrect, please do kindly correct me too!)
Thank you very much in advance.
I am working on a study where a group of individuals have a CT scan for a specific measurement (let's call it ct) at baseline (t0), then at 2 more follow-up (t1 and t2). The interval for follow-up was not uniform across individuals, and the time between t0 and subsequent followups is represented by variable time (a continuous variable). These individuals are assigned into 3 groups based on their comorbidities, age, etc, which is represented by variable group (values 1, 2, 3). Each individual is assigned a number (id). There are covariates but let's simplify things by just putting one for now (covar).
I am interested in comparing the change in ct over time between groups, which, as I understand, can be done with the following code to allow for random effects at the individual level (there is no reason to suspect random slopes I think):
Code:
mixed ct i.group##c.time covar || id:, covariance(unstructured)
However, I also want to report the mean estimated rate of change in ct (per unit time) for each group, i.e. not only the difference between groups, but also the absolute value of the mean rate of change for each group. I suspect this can be done using something under the 'predict' postestimation command, but what should the code be? I'm admittedly not familiar with postestimation commands here so would appreciate expert help around here. (Of course, if any of the above is incorrect, please do kindly correct me too!)
Thank you very much in advance.
Comment