全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 HLM专版
3265 1
2014-04-30

I am struggling with the coxme package in R. I would like to use a function like survfit() - the way it would ordinarily be used for a coxph() model - to plot adjusted survival curves and find the median survival at different parameter values.

If I fit the model using coxph without random effects I can do the following:

library(KMsurv)data(burn)my.surv <- with(burn, Surv(T1, D1))cox_nr = coxph(my.surv ~ Z1 , data = burn)survfit(cox_nr, newdata = data.frame(Z1 =1))

This provides survival estimates. But if I fit the same model with coxme:

library(coxme)cox_r = coxme(my.surv ~ Z1 + (1|Z11), data = burn)survfit(cox_r, newdata = data.frame(Z1 = 1))

Error in UseMethod("survfit", formula) : no applicable method for 'survfit' applied to an object of class "coxme"

So survfit.coxme doesn't seem to exist and from reading the coxme package documentation, I don't see an equivalent. Is there something fundamentally wrong about what I am attempting to do? If not, how can I get these estimates?


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-5-20 21:41:53
survival package
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群