On 2021-04-04 10:45 p.m., John Fox wrote:
Dear John,
I think that what you're looking for is
plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2),
sex=factor("female", "male"
Whoops, that should be
plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2),
sex=factor(c("female", "male
Dear John,
I think that what you're looking for is
plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2),
sex=factor("female", "male"
assuming, of course, that sex is a factor with levels "female" and "male".
I hope this helps,
John
John Fox, Professor Emeritus
McMaster University
Ha
Colleagues,
I am using the coxph to model survival time. How do I plot an adjusted Kaplan
Meir plot resulting from coxph? The code I would like to run would start with:
# run cox model
fit1Cox <- coxph(surv_object ~age+sex,data=mydata)
I have no idea what would follow.
I would like to plot adju
3 matches
Mail list logo