Dear list,
I need to extract the approximate Wald test (Chisq) so
that I can put it in a loop. str seemed like a great
idea, but I cannot seem to find the approximate Wald
test for frailty (in the example data below: 17.89 and
its p-value 0.12000) there. I cannot seem to find it
in capture.output
On Tue, 17 Apr 2007, Mohammad Ehsanul Karim wrote:
> Dear List,
>
> How do I extract the approximate Wald test for the
> frailty (in the following example 17.89 value)?
The example you give silently invokes print.coxph() to produce that
output.
You _can_ use
tmp <- capture.output( pri
Assign the output of coxph to some object, and use the $ extractor function
to obtain what you need.
ie:
rtfm <- coxph(formula = Surv(time, status) ~ age + sex + disease +
frailty(id, dist = "gauss"), data = kidney)
Age <- coef(rtfm)["age"]
OR
Sex <- rtfm$coef["sex"]
Hope this helps.
Paul
M
Dear List,
How do I extract the approximate Wald test for the
frailty (in the following example 17.89 value)?
What about the P-values, other Chisq, DF, se(coef) and
se2? How can they be extracted?
##>
kfitm1
Call:
coxph(formula = Surv(time, sta