Nicolas RODE
2009-Oct-02 12:54 UTC
[R] Weibull survival regression model with different shape parameters
Dear R users, I'm trying to fit a parametric survival model using the survreg function with a Weibull distribution. I'm studying the time to death of individuals from different families and I would like to fit different shape parameters (ie 1/scale in R) for each of the families. I looked it up in the help pdf and on the internet, but I couldn't find anything. Would it be possible to do such a thing ? Thanks in advance, Best regards, Nicolas N. Rode PhD student CEFE (Centre d'Ecologie Fonctionnelle et Evolutive) 34293 Montpellier, France -- passerelle antivirus du campus CNRS de Montpellier -- [[alternative HTML version deleted]]
Terry Therneau
2009-Oct-03 13:46 UTC
[R] Weibull survival regression model with different shape parameters
--- begin included message ------- I'm trying to fit a parametric survival model using the survreg function with a Weibull distribution. I'm studying the time to death of individuals from different families and I would like to fit different shape parameters (ie 1/scale in R) for each of the families. I looked it up in the help pdf and on the internet, but I couldn't find anything. Would it be possible to do such a thing ? ------- end inclusion -- Yes it is possible -- but clearly I need to add one more example to the help page; use a strata() term. Terry Therneau> survreg(Surv(time, status) ~ ph.ecog + age + strata(sex), lung)Coefficients: (Intercept) ph.ecog age 6.73234505 -0.32443043 -0.00580889 Scale: sex=1 sex=2 0.7834211 0.6547830 Loglik(model)= -1137.3 Loglik(intercept only)= -1146.2 Chisq= 17.8 on 2 degrees of freedom, p= 0.00014 n=227 (1 observation deleted due to missingness)