我正在使用 crrSC 包中的 crrs() 函数在 R 中运行分层细灰色模型。当使用 cmprsk 中的 crr() 函数运行 Fine-Gray 模型时,可以使用summary() 获取输出中的 exp(coef) 和置信区间。但是我不认为 crrs() 是这种情况。有人知道如何使用 crrs() 获取 exp(coef) 和置信区间吗?
这里是示例代码来演示我的意思:
library(casebase)
library(cmprsk)
library(crrSC)
head(bmtcrr)
covariates <- model.matrix(~bmtcrr$Age)[,-1]
### Fine-Gray model:
fg_mod <- crr(ftime = bmtcrr$ftime, fstatus = bmtcrr$Status, covariates, failcode = 1, cencode = 0)
summary(fg_mod)
### Stratified Fine-Gray model:
fg_mod_strat <- crrs(ftime = bmtcrr$ftime, fstatus = bmtcrr$Status, covariates, strata = bmtcrr$Sex, failcode = 1, cencode = 0, ctype = 1)
summary(fg_mod_strat)
显然没有
summary.crrs
功能。如果您使用为 crr
类对象设计的函数,您可以获得合理的输出,尽管会出现与丢失案例的计数未记录在 crrs
对象中这一事实相关的错误:
summary.crr(fg_mod_strat)
Competing Risks Regression
coef exp(coef) se(coef) z p-value
[1,] -0.0228 0.977 0.0112 -2.03 0.042
exp(coef) exp(-coef) 2.5% 97.5%
[1,] 0.977 1.02 0.956 0.999
Num. cases =Error in if (x$n.missing > 0) cat(" (", x$n.missing, " cases omitted due to missing values)", :
argument is of length zero