Hello SAS community, recently my team is working on a serology study which involves some longitudinal data. We came up with a proc mixed code for the analysis and would like to hear your feedback, any comment is welcome!
Here is a sample data:
data serology;
input id gender group type il2 il5 il6 @@;
datalines;
1 1 1 1 6232 3193 5233
1 1 1 2 4689 7653 1231
2 1 2 1 8863 3659 1122
2 1 2 2 7789 1123 5302
3 2 1 1 6653 8842 9082
3 2 1 2 6321 3134 1234
4 1 3 1 5312 1251 7861
4 1 3 2 8764 1244 5721
;
run;
Variable descriptions:
ID= subject's identification no.
gender= subject's gender
group= 1 (control), 2 (treatment A), 3 (treatment B)
type= 1 (blood sample collected from site 1), 2 (blood sample collected from site 2)
il2, il5, il6 = serology variables of interest
Blood samples for each subject must be collected from site 1 first, and after some time they were collected again at site 2. We also have sample collection dates in the data (not provided in the above code).
The main research question is to investigate whether the variables of interest (il2, il5, and il6) are different among "groups" and "types".
At first we thought about performing ANOVA or GLM, but we decided that we should consider "type" as time point for doing longitudinal analysis. So far we have the following code:
proc mixed data=serology;
class id gender group type;
model (il2 il5 il6) = gender group type/ solution;
repeated /type=un subject=id r corr;
run;
We are considering each variable of interest one at a time to see whether there's difference among group or type, adjusted for gender, using unstructured covariance matrix structure. Might someone be willing to confirm or comment on whether the proc mixed here does what I stated, whether it is appropriate in this case, or provide any suggestion for improvement?
My other question is about the dates. Is it possible to adopt the "dates of sample collection" in the above proc mixed for more accurate longitudinal analysis? Let's denote the date of sample collection by DOSC, would changing the repeated statement to "repeated DOSC" do the job?
Thank you!
RC
... View more