[R] Weibull survival regression model with different shape parameters
Terry Therneau
therneau at mayo.edu
Sat Oct 3 15:46:58 CEST 2009
--- 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)
More information about the R-help
mailing list