I am looking for help on how to account for cluster randomization in a Cox model, specifically, how to specify the experimental unit so as to get correct degrees of freedom on treatment. Using SAS 9.4. We have conducted a cluster randomized trial in dairy cows. That means outcomes were measured at the level of the cow, but dietary treatment was assigned to pens (groups of cows in the same pen at the same time on a farm). Here, 2 treatments, 4 farms, 4 study periods on each farm (2 TRT, 2 control, alternated within a farm over time e.g. 3 months on TRT, 3 months on CON, 3 mo on TRT, 3 mo on CON; random which one to start). To specify the correct experimental unit and get appropriate denominator d.f. in linear and logistic models, we use a RANDOM treatment*farm*period term in MIXED and GLIMMIX. The question is, in PHREG how can we specify to get an appropriate ddf for treatment? I have played with creating the treatment*farm*period term in a data step and specifying that as a RANDOM term in PHREG: data clustered; set full.data; cluster = treatment*farm*period; Proc PHREG data=clustered ; class treatment farm period ; model timetopregnancy*pregnant(0) = treatment / ties = exact risklimits ; random cluster ; run; I get a somewhat smaller "adjusted df" for treatment in the "Type 3 Effects" table than without this random term, and a wider CI on the HR for treatment. Seems right...? Is this valid?
... View more