Announcement

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

  • Plot lincom outputs after stcox regression

    Hi,

    I want to plot hazard ratios with 95% CI obtained from lincom command after performing stcox regression.

    a, b and c are categorical variables

    stcox i.a i.b i.c

    The plot that I will like to obtain will look like this:

    Click image for larger version

Name:	Imagen 1.jpg
Views:	1
Size:	62.1 KB
ID:	1728937


    Situation 1 will be the result from the hr obtained from: lincom 0.a + 0.b + 0.c, hr

    Situation 2 will be the result from the hr obtained from: lincom 0.a + 0.b + 1.c, hr

    Situation 3 will be the result from the hr obtained from: lincom 0.a + 1.b + 1.c, hr

    Situation 4 will be the result from the hr obtained from: lincom 1.a + 1.b + 1.c, hr


    Thank you very much
    Last edited by carlos couceiro; 03 Oct 2023, 09:26.

  • #2
    Save the standard errors and coefficients from lincom in a matrix and use coefplot from SSC to plot. See e.g., https://www.statalist.org/forums/for...ls-in-coefplot.

    Comment


    • #3
      Thank you very much for your help!

      Comment

      Working...
      X