[R] cluster() or frailty() in coxph
Joshua Wiley
jwiley.psych at gmail.com
Sun Jun 26 09:25:20 CEST 2011
Hi Ehsan,
My understanding (hopefully someone will jump in if this is wrong) is
that cluster() identifies a variable that is an indicator for
correlated observations (rats in a litter, children in a classroom,
etc.). The relative risk from treatment (rx) is for a random sample
of rats.
frailty() estimates the relative risk from treatment (rx) within
litters. Also, by default, it (frailty) uses a gamma distribution and
estimates the scale parameter unless specified by theta (or df).
There is an entire chapter devoted to frailty models in Therneau &
Grambsch book on the cox model (the title is something like Survival
Data Analysis).
HTH,
Josh
On Sat, Jun 25, 2011 at 3:48 PM, Ehsan Karim <wildscop at hotmail.com> wrote:
> Dear List,
>
> Can anyone please explain the difference between cluster() and
> frailty() in a coxph? I am a bit puzzled about it. Would appreciate
> any useful reference or direction.
>
> cheers,
>
> Ehsan
>
>
>
>> marginal.model <- coxph(Surv(time, status) ~ rx + cluster(litter), rats)
>> frailty.model <- coxph(Surv(time, status) ~ rx + frailty(litter), rats)
>> marginal.model
> Call:
> coxph(formula = Surv(time, status) ~ rx + cluster(litter), data = rats)
>
>
> coef exp(coef) se(coef) robust se z p
> rx 0.905 2.47 0.318 0.303 2.99 0.0028
>
> Likelihood ratio test=7.98 on 1 df, p=0.00474 n= 150
>> frailty.model
> Call:
> coxph(formula = Surv(time, status) ~ rx + frailty(litter), data = rats)
>
> coef se(coef) se2 Chisq DF p
> rx 0.914 0.323 0.319 8.01 1.0 0.0046
> frailty(litter) 17.69 14.4 0.2400
>
> Iterations: 6 outer, 24 Newton-Raphson
> Variance of random effect= 0.499 I-likelihood = -180.8
> Degrees of freedom for terms= 1.0 14.4
> Likelihood ratio test=37.6 on 15.4 df, p=0.00124 n= 150
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/
More information about the R-help
mailing list