![](/img/trans.png)
[英]Calibrating a Cox PH model with R packages 'survival' and 'rms': time unit confusion
[英]How to get for an intercept only cox ph model in R and what does that mean in the survival package?
一個人如何設置參數以使其僅在生存包或其他情況下攔截,以及關於 cox 比例風險模型,攔截僅真正意味着什么。
R 回歸公式中制作我稱之為“空模型”而不是“僅截取”模型的標准方法是使用~1
作為唯一術語。 (事實證明,您也可以使用~0
作為唯一的術語。)在生存模型中,“截距”是基線風險(所有協變量估計值都參考的估計值),可以在survival
包中找到對於包含使用basehaz
函數的協變量的模型。 因此,如果我理解您的意圖,“僅攔截”Cox 模型將只是未經調整的 Kaplan-Meier 估計。
test1 <- list(time=c(4,3,1,1,2,2,3), # example code ?coxph
status=c(1,1,1,0,1,1,0),
x=c(0,2,1,1,1,0,0),
sex=c(0,0,0,0,1,1,1))
# Fit a stratified model
nullfit <- coxph(Surv(time, status) ~ 0, test1) # Null model
survfit( nullfit)
# ----
Call: survfit(formula = nullfit)
n events median 0.95LCL 0.95UCL
[1,] 7 5 3 2 NA
# ----
png(); plot( survfit( nullfit) ); dev.off()
沒有任何其他上下文,“僅攔截”模型只是平均值。 基本上,如果您在 x 上對 y 進行回歸,則僅截距模型是 y 平均值處的一條平線(在 x 處的所有值處)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.