R语言 svycoxph如何处理领带?

huwehgph  于 2023-01-28  发布在  其他
关注(0)|答案(1)|浏览(171)

据我所知,coxph默认是处理领带的,有3个处理领带的选项,不知道调查包里的svycoxph是怎么处理领带的,是不是和coxph一样,好像没有这个选项。
CRAN里没有提到领带,我也找不到任何关于领带的信息。有人知道吗?

3htmauhk

3htmauhk1#

对于svycoxph,根据文档,可以在3个点...中传递coxph的参数
... -对于AIC,比较AIC的更多模型。对于 svycoxph,传递给 coxph 的其他参数。
如果我们看一下coxph的参数

args(coxph)
function (formula, data, weights, subset, na.action, init, control, 
    ties = c("efron", "breslow", "exact"), singular.ok = TRUE, 
    robust, model = FALSE, x = FALSE, y = TRUE, tt, method = ties, 
    id, cluster, istate, statedata, nocenter = c(-1, 0, 1), ...)

其中ties(默认为“efron”)也在method中分配
另外,通过查看svycoxph的一个方法的源代码

getAnywhere("svycoxph.svyrep.design")

function (formula, design, subset = NULL, rescale = NULL, ..., 
    return.replicates = FALSE, na.action, multicore = getOption("survey.multicore")) 
{

...
...
if (full$method %in% c("efron", "breslow")) { ### here
        if (attr(full$y, "type") == "right") 
            fitter <- coxph.fit
        else if (attr(full$y, "type") == "counting") 
            fitter <- survival::agreg.fit
        else stop("invalid survival type")
    }
    else fitter <- survival::agexact.fit
    
...

使用svycoxph文档中的一个可重现的小示例

> svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=rpbc, ties = "efron")
Call:
svycoxph.svyrep.design(formula = Surv(time, status > 0) ~ log(bili) + 
    protime + albumin, design = rpbc, ties = "efron")

              coef exp(coef) se(coef)      z        p
log(bili)  0.88592   2.42522  0.09838  9.005  < 2e-16
protime    0.24487   1.27745  0.09373  2.612  0.00899
albumin   -1.04298   0.35240  0.21966 -4.748 2.05e-06

Likelihood ratio test=NA  on 3 df, p=NA
n= 312, number of events= 144 
> svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=rpbc, ties = "breslow")
Call:
svycoxph.svyrep.design(formula = Surv(time, status > 0) ~ log(bili) + 
    protime + albumin, design = rpbc, ties = "breslow")

              coef exp(coef) se(coef)      z       p
log(bili)  0.88527   2.42363  0.09834  9.002 < 2e-16
protime    0.24494   1.27754  0.09373  2.613 0.00897
albumin   -1.04112   0.35306  0.21992 -4.734 2.2e-06

Likelihood ratio test=NA  on 3 df, p=NA
n= 312, number of events= 144

相关问题