BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jepsantos
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
jepsantos
Calcite | Level 5

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,

 

View solution in original post

2 REPLIES 2
jepsantos
Calcite | Level 5

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,

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1824 views
  • 1 like
  • 2 in conversation