It has been awhile since I had to run a time test for trend and I find myself hitting a wall on where to start.
In my datasets, I have those that have taken a drug of interest and those who have not. We measure bone density at one site on each individual (control) and on other site (case) so each person is their own case and control. We have age, sex, race. Measurements were taken of bone density at baseline, 3 months and 6 months.
The main question of interest is, for those who take drug of interest versus those that do not, is there a significant change over time in bone density at the site of case/control. I am really drawing a blank and appreciate any help or guidance. Thank you.
1) if you have no missing data (or apply PROC MI), you can use a multivariate GLM with 6 dependent variables. Then you can apply contrasts in the dependent variable space to address the differential trends.
2) you could treat this as a repeated measures analysis and apply PROC MIXED.
The specifics of the CONTRAST statement syntax are in the reference manual. You can also do repeated measures analysis in GLM rather than MIXED.
In both the multivariate approach and the repeated measures approach, you can do tests for trends with orthogonal polynomials (though with just 3 time points, it's hard to do more than a linear trend test).
Littell, Stroup, and Freund's book "SAS for linear models" has a couple of good chapters on this.