[R] How to extract the theta values from coxph frailty models

David Winsemius dwinsemius at comcast.net
Mon Aug 31 15:41:21 CEST 2009


On Aug 31, 2009, at 1:57 AM, shankar at bios.unc.edu wrote:

> Hello,
> I am working on the frailty model using coxph function. I am running  
> some simulations and want to store the variance of frailty (theta)  
> values from each simulation result. Can anyone help me how to  
> extract the theta values from the results. I appreciate any help.

Lacking any specifics at all, I turn to the example provided in  
frailty::survival.

m <- coxph(Surv(time, status) ~ age + frailty(inst, df=4), lung)
str(m)

m$history$`frailty(inst, df = 4)`$theta

-- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list