Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Cox regression Model in R language

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

The knowledge of this article "R language how to achieve Cox regression model" is not understood by most people, so the editor summarizes the following, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "R language how to achieve Cox regression model" article.

Analysis of Cox Model in R language

Univariate Cox regression

Summary (res.cox) res.cox | z |)

Sex-0.5310 0.5880 0.1672-3.176 0.00149 * *

-

Signif. Codes: 0'* * '0.001'.

Exp (coef) exp (- coef) lower. 95 upper. 95

Sex 0.588 1.701 0.4237 0.816

Concordance= 0.579 (se = 0.021)

Likelihood ratio test= 10.63 on 1 df, pendant 0.001

Wald test = 10.09 on 1 df, pendant 0.001

Score (logrank) test = 10.33 on 1 df

The results of Cox regression can be explained as follows:

Statistical significance. The column marked "z" gives the Wald statistics. It corresponds to the ratio of each regression coefficient to its standard error (z = coef / se (coef)). Wald statistical evaluation of whether the beta (β β) coefficient is statistically significant different from 0. From the above output, we can conclude that the variable sex has a highly statistically significant coefficient.

Regression coefficient. The second feature that should be paid attention to in the results of Cox model is the symbol of regression coefficient (coef). A positive signal means that the risk (risk of death) is higher, so for those with higher variable values, the prognosis is worse. The gender of the variable is encoded as a numerical vector. 1: male, 2: female. The R summary of the Cox model gives the second group relative to the first group, that is, the risk ratio of women to men (HR). The β coefficient of gender =-0.53 indicates that in these data, the risk of death (low survival rate) of women is lower than that of men.

The proportion of harm. The exponential coefficient (exp (coef) = exp (- 0.53) = 0.59) is also called risk ratio, which gives the effect of the covariable. For example, women (sex = 2) reduced the harm by 0.59 times, or 41%. There is a good correlation between female and prognosis.

Confidence interval of risk ratio. The summary results also give the upper and lower limits of the 95% confidence interval of the risk ratio (exp (coef)), the lower limit = 0.4237 and the upper limit = 0.816.

A model of global statistical significance. Finally the output provides three alternative test p values for the overall significance of the model: the probability ratio test the Wald test and the score logrank statistics. These three methods are asymptotically equivalent. For N large enough, they will get similar results. For Xiao N, they may be different. Likelihood ratio test has better performance for small sample size, so it is usually preferred.

Batch univariate cox analysis covariates

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report