marginal.model <- coxph(Surv(time, status) ~ rx, data= rats, cluster=litter,
subset=(sex=='f'))
frailty.model <- coxph(Surv(time, status) ~ rx + frailty(litter), rats,
subset=(sex=='f'))
Run the code above in your browser using DataLab