简体   繁体   English

考克斯危害模型和趋势测试

[英]Cox hazards model and test for trend

如果我有一个Cox比例风险模型,并使用一个分类变量(以及其他协变量,例如年龄等)作为事件的预测因子,那么例如,我感兴趣的分类变量是肿瘤大小,可以是0-10、10-例如20、20-30,我发现随着肿瘤大小的增加,死亡心率有增加的趋势,我该如何在r中计算并获得ap?

There is a bit of danger in accepting your incomplete specification since you could have a size classification that will mess this up, as for example: 0-10, 10-20, 20-30, 30-80, 80-120, 120-240. 接受不完整的规格会有一定的危险,因为您可能会有尺寸分类,例如:0-10、10-20、20-30、30-80、80-120、120- 240。 Unless you have carefully constructed your factor to have correctly ordered ascending levels, what I am about to suggest as a shortcut will fail. 除非您精心构建了正确排序升序的因子,否则我建议的捷径将失败。

 survmdl <- coxph(Surv(tie,event) ~ as.numeric(fact), data=dat)

You will get a "test of trend" which would be interpreted as the per-category increase in the log(Hazard) for rising size and it would be a single coefficient. 您将获得“趋势测试”,这将被解释为随着大小的增加,对数(危害)的每类增加,并且它将是一个系数。 So post your actual factor levels if you wnat a better considered reply. 因此,如果您希望得到更好的答复,请发布实际因素水平。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM