Announcement

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

  • stcox PH violation for categorical variable; advice on interpretation and solution

    Dear Stata listers,


    I am trying to evaluate whether depression increases the risk for mortality using the following data through a cox regression, where illness indicate the number of comorbidities and severe the severity of depression:
    Code:
    id      respsex    age        depression       illness       days    dead      severe           bmi        meds2
    
    272     female    65.67665    no depression    one to two    850     alive    no depression    32.70777    None
    1425    female    65.66917    no depression    one to two    1591    alive    no depression    21.66308    antidepressant
    2528    female    64.87322    depression       one to two    2232    alive    subclinical      27.42081    None
    1635    female    65.02994    depression       one to two    1655    dead     no depression    27.29631    antidepressant
    2276    male      64.43664    depression       one to two    1983    alive    moderate         30.81966    None
    after I run my regression:

    stcox i.depression i.respsex age bmi i.illness i.severe
    I produce the following output:
    Click image for larger version

Name:	output2.png
Views:	1
Size:	29.2 KB
ID:	1669188




    I then run
    estat phtest, detail
    to test that hazards are proportional, and one of my variables violates this assumption (and another one almost does as well):
    Click image for larger version

Name:	detail.png
Views:	1
Size:	18.4 KB
ID:	1669189



    I've also produced two stph plots, one without the illness variable, and anohter without the severity variable:


    stphplot, by(depression) adjust(respsex age bmi severe)
    Click image for larger version

Name:	stphplot no illness.png
Views:	1
Size:	56.0 KB
ID:	1669191




    Code:
    stphplot, by(depression) adjust(respsex age bmi illness)
    Click image for larger version

Name:	stphplot no severe.png
Views:	1
Size:	56.9 KB
ID:	1669192




    As you can see, the hazards looks reasonably proportional when I drop the severity variable, but the overall model loses explanatory power (e.g., HR for depression goes up to ~3).

    I'm new to survival analysis and I'm not quite sure how to proceed here. From what I read in previous posts (e.g., https://www.statalist.org/forums/for...t-met-in-stata) it may be appropriate to use the tvc command to include variables that violate the PH assumption, however it seems that this is inappropriate for categorical variabels (e.g., https://www.statalist.org/forums/for...rying-analysis). Another solution that I've come across is to stsplit the data, but since this isn't trial data there isn't an obvious point at which to split the dataset (e.g., post-intervention).

    What would be a good solution to this issue?

    Best wishes,
    Konrad

  • #2
    have you solved that issue? I'm having the same problem, then stumbled across your post.

    Paolo

    Comment

    Working...
    X