CoxModel[…]
表示从 CoxModelFit 得到的符号式比例风险模型.
CoxModel
CoxModel[…]
表示从 CoxModelFit 得到的符号式比例风险模型.
更多信息和选项
- Cox 模型的属性从 CoxModel[…]["property"] 得到.
- CoxModel[…][{prop1,prop2,…}] 给出某些属性.
- CoxModel[…][x0][t] 对变量水平 x0 给出在特定点 t 的最佳拟合函数的数值.
- Normal 给出 CoxModel 中基本生存函数的表达式.
- CoxModel[…][prop,ann] 给出与属性 prop 相关联的注解 ann.
- 对于给定的拟合模型类型,可用属性列在生成模型诸如 CoxModelFit 的函数中.
- CoxModel 接受以下选项:
-
ConfidenceLevel 
用于参数和预测的置信水平 ConfidenceRange All 同步置信带的取值范围 ConfidenceTransform "LogLog" 要使用的置信水平转换
范例
打开所有单元 关闭所有单元基本范例 (1)
从某些右删截数据创建 CoxModel:
data = EventData[{1, 2, 3, 4}, {0, 0, 1, 0}];mod = CoxModelFit[data]mod["EventTimes"]mod[3]Normal[mod]mod["Properties"]范围 (5)
从 CoxModel 对象提取属性:
mod = CoxModelFit[{1, 2, 3, 4}]mod["StandardErrors"][]mod = CoxModelFit[{1, 2, 3, 4}]mod[{"MartingaleResiduals", "CoxSnellResiduals"}]mod = CoxModelFit[{1, 2, 3, 4}];mod[2]mod /@ {1, 2, 3, 4}mod = CoxModelFit[{1, 2, 3, 4}];Normal[mod]mod = CoxModelFit[{1, 2, 3, 4}];Table[Row[{i, ":
", mod["BaselineList", i]}], {i, {"Description", "LongDescription"}}]//TableForm选项 (5)
ConfidenceLevel (3)
ξ = {{67, 1}, {11, 0}, {32, 0}, {50, 1}, {65, 1}, {44, 1}, {20, 1}, {26, 0}, {69, 1}, {50, 1}, {25, 1}, {18, 0}, {63, 1}, {41, 0}, {30, 0}, {32, 1}, {46, 1}, {35, 0}, {33, 0}, {22, 0}};
e = EventData[Automatic, {{8, 22, 6, 4, 12, 11, 2, 34, 25, 15, 8, 6, 34, 6, 32, 1, 15, 9, 9, 6},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0}, None}];model = CoxModelFit[{ξ, e}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[x, 1], Subscript[x, 2]}]Table[Plot[Evaluate@{model["SF"][][t], model["PointwiseBands", "SF", ConfidenceLevel -> i][][t]}, {t, 0, 35}, PlotLabel -> i], {i, {.9, .95, .99}}]ξ = {{67, 1}, {11, 0}, {32, 0}, {50, 1}, {65, 1}, {44, 1}, {20, 1}, {26, 0}, {69, 1}, {50, 1}, {25, 1}, {18, 0}, {63, 1}, {41, 0}, {30, 0}, {32, 1}, {46, 1}, {35, 0}, {33, 0}, {22, 0}};
e = EventData[Automatic, {{8, 22, 6, 4, 12, 11, 2, 34, 25, 15, 8, 6, 34, 6, 32, 1, 15, 9, 9, 6},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0}, None}];model = CoxModelFit[{ξ, e}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[x, 1], Subscript[x, 2]}];model["ParameterConfidenceIntervals"]Table[model["ParameterConfidenceIntervals", ConfidenceLevel -> i], {i, {.85, .9, .95}}]ξ = {{67, 1}, {11, 0}, {32, 0}, {50, 1}, {65, 1}, {44, 1}, {20, 1}, {26, 0}, {69, 1}, {50, 1}, {25, 1}, {18, 0}, {63, 1}, {41, 0}, {30, 0}, {32, 1}, {46, 1}, {35, 0}, {33, 0}, {22, 0}};model = CoxModelFit[{ξ, EventData[Automatic, {{8, 22, 6, 4, 12, 11, 2, 34, 25, 15, 8, 6, 34, 6, 32, 1, 15, 9, 9, 6},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0}, None}]}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[x, 1], Subscript[x, 2]}]model["EventTable", "CHF", ConfidenceLevel -> .90][{50, 1}]ConfidenceRange (1)
model = CoxModelFit[EventData[Automatic, {{{2081, Infinity}, {1602, Infinity}, {1496, Infinity}, {1462, Infinity},
{1433, Infinity}, {1377, Infinity}, {1330, Infinity}, {996, Infinity}, {226, Infinity},
{1199, Infinity}, {1111, Infinity}, {530, Infinity}, {1182, Infinity}, {1167, Infinity}, 418,
383, 276, 104, 609, 172, 487, 662, 194, 230, 526, 122, 129, 74, 122, 86, 466, 192, 109, 55, 1,
107, 110, 332}, None, None}]]Plot[Evaluate@{model["SF"][][x], model["EqualPrecisionBands", ConfidenceRange -> {172, 383}][][x]}, {x, 100, 500}, PlotRange -> {0, 1}]默认情况下,范围被设为 All:
Plot[Evaluate@{model["SF"][][x], model["EqualPrecisionBands", ConfidenceRange -> All][][x]}, {x, 0, 2081}, PlotRange -> {0, 1}]将范围设为 Full:
Plot[Evaluate@{model["SF"][][x], model["EqualPrecisionBands", ConfidenceRange -> Full][][x]}, {x, 0, 2081}, PlotRange -> {0, 1}]ConfidenceTransform (1)
ξ = {1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0};model = CoxModelFit[{ξ, EventData[Automatic, {{8, 22, 6, 4, 12, 11, 2, 34, 25, 15, 8, 6, 34, 6, 32, 1, 15, 9, 9, 6},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0}, None}]}, x, x]tr = {"Linear", "LogLog", "ArcSinSqrt", "Log", "Logit"};Table[{i, model["PointwiseBands", "SF", ConfidenceTransform -> i][][15]}, {i, tr}]//GridTable[Plot[Evaluate@{model["SF"][][t], model["PointwiseBands", "SF",
ConfidenceTransform -> i][][t]}, {t, 0, 35}, PlotLabel -> i], {i, tr}]model["PointwiseBands", ConfidenceTransform -> "LogLog"][{0}][15]model["PointwiseBands"][{0}][15]相关指南
-
▪
- 生存分析
文本
Wolfram Research (2012),CoxModel,Wolfram 语言函数,https://reference.wolfram.com/language/ref/CoxModel.html.
CMS
Wolfram 语言. 2012. "CoxModel." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/CoxModel.html.
APA
Wolfram 语言. (2012). CoxModel. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/CoxModel.html 年
BibTeX
@misc{reference.wolfram_2026_coxmodel, author="Wolfram Research", title="{CoxModel}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CoxModel.html}", note=[Accessed: 07-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_coxmodel, organization={Wolfram Research}, title={CoxModel}, year={2012}, url={https://reference.wolfram.com/language/ref/CoxModel.html}, note=[Accessed: 07-September-2026]}