I am working on a data set in which treatments were applied to groups of individuals (in this case, groups of cows), but time to event (pregnancy or removal from the herd) was measured at the individual cow level.
I have analyzed clustered data of continuous or categorical nature with mixed models using Proc Mixed (continuous) and Glimmix (categorical) with random effect of cluster nested within treatment to specify the proper error term for testing the effects of treatments.
In this particular case, cows were housed in different groups within a farm and each group was fed either a control or an intervention diet. For each of the two treatments, we had 8 groups (n = 16 total experimental units) and in each group we had variable numbers of cows (40 to 55 each). The total number of cows was 840, but we only had 16 experimental units (15 degrees of freedom).
When I analyze continuous variables (e.g. milk yield, kg/d), I fit a mixed model with the random effect of group nested within treatment in Proc Mixed
- Random group(treatment);
However, my problem is how to properly analyze time to event (survival analysis) with such type of data.
I have used frailty models with PHREG to analyze clustered data, but the clusters in those cases had individuals that received the treatment and individuals that remained as controls. In those cases, I simply included
- Random cluster;
To handle the random effect of cluster in the model.
The issue with the y current data is that cluster 1 has individuals that received only the control diet, whereas cluster 2 has individuals that received only intervention diet, and so forth.
I have tried to identify how SAS PHREG handles such data, but have not been able to find examples.
I would appreciate your comments on this issue.
See attached file in Excel.
Thank you. Best regards,
Jose E. Santos
Department of Animal Sciences
University of Florida
Thank you!
I used SURVERYPHREG and the Cluster function to identify the clusters and, according to the descritpion in SAS and the denominator DF, it now computes the proper error term.
Best regards,
Have you looked at PROC SURVEYPHREG?
https://support.sas.com/rnd/app/stat/procedures/surveyphreg.html
Thank you!
I used SURVERYPHREG and the Cluster function to identify the clusters and, according to the descritpion in SAS and the denominator DF, it now computes the proper error term.
Best regards,
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.