2022년 11월 12일 토요일

ch.16 Cox regression

 easier R than SPSS with Rcmdr : Contents

 

ch.16 Cox regression


Cox proportional hazard regression is abbreviated to Cox regression.

 

Very similar to logistic regression, with one more variable called ‘time’.


If you select without any other options, you will see results that are almost identical to logistic regression.

 

In logistic regression, exp(coef) is called the ‘odds ratio’(OR), and in Cox regression it is called the ‘hazard ratio’(HR). Only the name has changed slightly, and the interpretation is almost the same.

 

Now let’s add a few options.

  

 

This is a plot for diagnosis, with the left showing residuals and the right examining the proportional hazard assumption of each independent variable. It should be constant regardless of the time to satisfy the assumption.

  

 

On the left is the baseline survival curve, and on the right is the Kaplan Meier curve. It don’t make it here, but I drew it to compare.

 

If you want to create a Kaplan Meier curve, do not select anything in the green square during the logrank test.


If you put a period in the red circle part, it means ‘all variables except time and event’. When you want to exclude a variable (e.g. sex), you can use the ‘. – sex’. This promise is the same for logistic regression.

The work inside the red square shows the process of selecting variables by removing them one by one. Same as we saw earlier in linear regrssion and logistic regression.

 


Finally, the model was determined using the AIC.


This is the result of the BIC.

Depending on how you do this, the results of the final model may vary.

 

 

 

Here we need to look a little at the meaning of the formula.

+ and . and - is the same as already described.

: means ‘test the interaction between variables’.

* means ‘test all interactions over three variables.’

 

For example

TheEducation * Catholic * Examination’ is

Education +Catholic +Examination +Education: Catholic +Catholic: Examination +Education: Examination +Education: Catholic : Examination’ .

 

The rest of the symbols do not need to know, and can be represented by all of the above operators.


Let’s choose ‘Adjusted survival curve’.


This is almost the same as drawing the Kaplan-Meier curve earlier, adding one variable to adjust. When we say that the ages of the trt group are different, we draw a picture by taking into account the influence of age. Once the final model is determined in the Cox regression, you can plot a KM curve by adding those variables.


‘Survival curve adjusted for age’ was drawn. When the three groups of trt are of equal age (= when adjusting the effect of age, remember ANCOVA), it is a mathematical calculation of how the survival curve will be.

 

Let’s choose ‘Stacked cumulative incidences’.


First, select only ‘time’ and ‘event’.

 

This will draw the overall ‘stacked cumulative incidences’.


Now specify the group variable.

 

      

Then you will see each of the three groups.


 

Next Part is for Statistics on Diagnosis


easier R than SPSS with Rcmdr : Contents

=================================================

  • R data visualization book 2
https://tinyurl.com/R-plot-II-2  simple variables
https://tinyurl.com/R-plot-II-3-4   many variables / map
https://tinyurl.com/R-plot-II-5-6   time related / statistics related
https://tinyurl.com/R-plot-II-7-8   others / reactive chart 
 

 


댓글 없음:

댓글 쓰기