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

I want to compute the AIC value for my survival analysis objects (suvfit/coxph). When I try to do it, it says:

> AIC(cox)  Error in UseMethod("logLik") :    no applicable method for 'logLik' applied to an object of class "coxph"

For what I understand that's a software limitation. Can anyone help me to solve this problem without computing the AIC value by hand?


二维码

扫码加我 拉你入群

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

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

全部回复
2014-4-30 03:31:48
I remember I was computing it by hand, like this

p <- 0;k <- 3
AIC0 <- -2*cox$loglik[1] + 2*(p+k)
p <- length(cox$coef)
AIC1 <- -2*cox$loglik[2] + 2*(p+k)
二维码

扫码加我 拉你入群

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

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

2014-5-20 21:40:49
other expressions?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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