Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • checking scale continous covariates after model selection

    Hi I currently have a model which i'm happy with
    stcox var1 var2 var 3 var4

    Var1 and var2 are continous and var3 and var4 are categorical.

    I'm reading right now: Applied Survival Analysis by David W Hosmer
    On the chapter 'Purposeful selection of covarites' it says,

    Once you're happy with the model, to check the scale of continuous covariates using quartile design. From what I gather here, they are assessing for any deviation from non-linearity
    They then proceed to graph the coeficients against group midpoints (green highlighted)
    Please note, this is a rather old book, 2008
    Click image for larger version

Name:	pic 1.PNG
Views:	1
Size:	377.9 KB
ID:	1725350


    A lot has been said against categorisation including the paper here: Section: Perceived problems with non-linear modelling
    Against quantiles: categorization of continuous variables in epidemiologic research, and its discontents - PMC (nih.gov)

    My question, perhaps more for the statisticians/epidemiologists:

    1. Should I have assessed the linearity of my continuous covariates before the model building using
    Code:
    lowess yvar xvar
    2. Or If I have finalised my model do I check for linearity here of rmy conitnous variable here in order to check if any transformations are required ? And if so what is the best way to do it
    Lowess as above? or perhaps using martingale residuals ?
    Code:
    stcox var1 var2, mgale(residuals)
    twoway (scatter residuals var1) lowess residuals var1)
    I found a slightly non-linear pattern with age, is there a way I can transoform age to log and square it in stata ?

    Click image for larger version

Name:	pic2 png.PNG
Views:	1
Size:	319.2 KB
ID:	1725351

    Click image for larger version

Name:	pic 3 png.PNG
Views:	1
Size:	358.5 KB
ID:	1725352

    Last edited by Martin Imelda Borg; 29 Aug 2023, 04:58.
Working...
X