Displaying 1 result from an estimated 1 matches for "pfit1".
Did you mean:
fit1
2010 Sep 13
0
using survexp and ratetable with coxph object that includes a factor term
Hello,
I'm attempting to use the ratetable argument to
survexp in the survival package. I use
the example from the ?survexp help page below,
and then slightly modify it to produce an error.
library(survival)
data(pbc)
#fit a model without any factors
pfit1 <- coxph(Surv(time, status > 0) ~ trt + log(bili) +
log(protime) + age + platelet, data=pbc)
#this works as expected
survexp(~ trt, ratetable = pfit1, data = pbc)
#now I fit a similar model, simply adding the 'sex' term
#note sex is now the only factor in the model
pfit2...