[R] Help on extract paramters from fitted models
marc_schwartz at comcast.net
Tue Apr 29 21:43:51 CEST 2008
> Hi, I have a question about how to extract paramters from a fitted model. I
> can extract coefficients and std, but from some other statistics, I dont
> know how to extract. Can anyone help?
> Here it is an example:
> coxph(formula = Surv(t, t.censor) ~ x)
> coef exp(coef) se(coef) z p
> x 0.349 1.42 0.257 1.36 0.17
> Likelihood ratio test=1.84 on 1 df, p=0.175 n= 200
> Any convienent way to extract the LRT and the p value? thank you!
Use the summary method for coxph objects:
Unfortunately, this is not documented in the built-in help for the
survival package, but you can see the structure for the summary.coxph
method by using:
?summary.coxph actually points to the structure details of a coxph
object, rather than the summary.coxph object.
More information about the R-help