Announcement

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

  • Hazard ratios after adjustrcspline, or a similar method for splines after Cox regression

    Hi! I apologise if this question is readily answered elsewhere. However, i feel i have combed the web quite extensively now.

    Purpose: I wish to create a Cox spline with HRs on the y-axis and a continuous predictor of interest on the x-axis.

    How doi intend to do it, and what have i tried? I have tried to use adjustrcspline. However, i am unsure as to how i pass the proper link functon to adjustrcspline to generate a graph of what i want. For exmaple in:

    "

    mkspline2 dot = age , cubic nknots(3)
    stcox dot*
    adjustrcspline, custominvlink( ? )

    "

    What do i specify to graph hazard ratios and to set the reference?

    I am a medical student and thus not a statistician: i therefore apologise if my questions seem ignorant, and would very much appreciate if you would explain any mathematical operations/presumptions if needed.

    I have generated graphs following logistic regression using " predict x, xb" and " predict x, stdp" , converting these to odds by exp(x) and dividing these by a reference to generate odds ratios. I am interested in generating similar graphs following Cox so that i may utilise survival analysis. However, it appears to be quite tricky.

    The graph i have attached in this post is generated with postestimation after logistic with definition of a reference value. I want to create something similar using Cox.



    Thank you so much!


    Click image for larger version

Name:	log.png
Views:	1
Size:	857.5 KB
ID:	1426186

  • #2
    dear friend, I only see your message now; I'm sorry that no one has answered (it happened to me too): try the link below, where you will probably find the solution of your problem
    http://biostat.mc.vanderbilt.edu/wik...per_22Apr16.do

    Comment


    • #3
      Interesting question, indeed. Because as of now (five yrs later), I am still unaware of any publicly available solution for this in STATA. Unfortunately, the link posted above is dead now., would have been exciting to have taken a look at this do flile.

      Comment

      Working...
      X