I am trying to run piece wise linear regression on a longitudinal dataset (because growth curve modeling is giving results which are clinically not plausible at certain time points). The sample dataset is attached in excel format and has the following columns/variables
1. Subject ID
2. Clinically planned event name (total 7 time points possible for a subject - 1 month, 6 months, 1 year, 2 years, 3 years, 4 years, 5 years)
3. Time (time in years)
4. Summary Score (the dependent variable in the model)
5. m6 (dummy variable for the first 6 months)
6. post6m (dummy variable for post - 6 months)
7. Group (treatment group)
The model I currently have is as follows:
proc glimmix data=PLR; class subjectid; model summaryscore = m6 post6m/solution; random intercept m6 post6m/ subject=subjectid type=chol; run;
Here is the question I have:
How do I get mean summary score by treatment group and difference between treatment groups in mean summary score (along with 95% CI and p-values) at the 7 different time points in the study? In other words, can someone help me with the syntax to add treatment group and time, and the interaction between treatment and time as covariates in the model, to get the mean and mean difference in summary scores between treatment groups, at various time points?
Here is what I need:
Predicted Mean Values (95% CI)
Predicted Mean Difference (TRT1-TRT2), 95%CI
P-value
TRT1
TRT2
Summary Score
1 Month
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
6 Months
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
1 Year
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
2 Years
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
3 Years
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
4 Years
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
5 Years
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
xx.x (xx.x, xx.x)
0.xxxx
Any suggestions are greatly appreciated!
... View more