Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to do Cox regression Survival Analysis with R language

Shulou Source: shulou.com Published: 2022-06-02 06:17:32 10月03日 Update

This article introduces the relevant knowledge of "how to use R language for Cox regression survival analysis". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In survival analysis, exploring the influencing factors of survival time is an important research content. Through KM and log-rank test test, we can only deal with the survival data of a single binary factor. When we want to explore the influence of multiple factors or discrete variables on survival time, we need to use cox regression method. The full name of cox regression is as follows

Cox proportional hazards regression model

It is called cox proportional hazard regression model, and the corresponding formula is as follows.

After log conversion, the above formula can be transformed into the following format

This formula is very close to the formula of logical regression. Cox regression is actually a method extended on the basis of linear regression and logical regression, which takes multiple factors affecting survival as independent variables in the regression equation and the ratio of risk function h (t) to h0 (t) as dependent variables.

The coefficients corresponding to each independent variable, such as b1 and B2, are called partial regression coefficients. When the partial regression coefficient is greater than 0, with the increase of the value of the independent variable, the risk increases and the survival time decreases; when the coefficient is less than 0, it is on the contrary; when it is equal to 0, there is no effect.

Exp (b) is called hazard ratio, or HR for short. Convert the partial regression coefficient to HR, and the corresponding relationship is as follows

HR = 1, no effect

HR > 1, increased risk

HR

< 1, 风险降低 在临床上,将HR>

The independent variable of 1 is called a bad prognostic factor, and HR

Tags: Risk independent variable time influence analysis coefficient factor data formula content method variable that is situation numerical value language salience two code factor Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn macOS Xiaomi Shulou Information Docker