Announcement

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

  • Kaplan Meier adjusted for confounders

    Hi everyone,

    I'm writing to you because I've been asked this by a reviewer: Kaplan Meier plots without controlling the effects of confounding factors in observational studies are sometimes misleading.

    Any ideas I could do this in STATA? I'm a medical student not very familiar with biostatistics and I've always done regular Kaplan Meier with sts graph in STATA but not adjusted.

    Thank in advance so much for your help,
    Best,

    Javier

  • #2
    Well, -sts graph- has an -adjjustfor()- option. You can specify the variables you want to adjust for. Unfortunately, the adjustment is to zero values of all of those variables--which is probably not what is typically wanted. While that solution deals with the confounding issues, it does so in a way that may leave the resulting curves not helpful. This would be particularly so if zero is an unusual, or, worse, impossible, value for one of the variables. So bearing this in mind, you might want to transform your confounder variables by centering them around some value that seems useful for a standardization, and then adjust on the transformed variables.

    Comment


    • #3
      Hi Clyde,

      Thank you so much for your valuable help, as usual. Appreciate it!

      I see. I will transform some of the potential confounder variables.

      Thanks again,
      Best,

      Javier.

      Comment


      • #4
        Hi everyone,
        Hi Clyde,

        I think "transforming the confounder variables" is a little unclear to me finally in this case. I'm not trying to plot the survival curves for a subject with specific values of confounders. I wanted to present the same thing that the regular Kaplan Meier but adjusted but in the whole population and not for some specific values of the covariates that a suject could have.

        Basically I wanted to plot the adjusted Kaplan Meier that is in accordance with the HR of my multivariate cox model.

        Is there a way to provide this kind of graph with the sts graph command and adjust for? Or is the best way is to plot the survival curves adjusted for the mean values in the sample fol all covariates? What is the solution that will provide a graph the most related to the results of the multivariate cox model?

        Thank you so much for your advice,
        Sorry in advance (a student who is beginning with Cox models).

        Javier.

        Comment


        • #5
          Oh, this is different from what I understood originally. The way to get the kind of plot you are describing is not with -sts graph- but with -stcurve- after you run your -stcox- model. Select the -survival- option, and any other options of -stcurve- that suit your specific needs. -help stcurve- is a starting point, and there is more information in the PDF manual entry linked near the top of the help file.

          Comment


          • #6
            To get what you want ("Kaplan Meier but adjusted but in the whole population and not for some specific values of the covariates") you need to use what's known as regression standardisation or g-computation to produce what are known as marginal survival, population averaged survival, or standardised survival (among other names).

            See https://pclambert.net/software/stand...ized_survival/

            Before doing that, I'll expand on Clyde's comments on -sts graph, adjustfor()- and why one should use it with caution. Consider the simple scenario of a binary exposure (variable named exposure coded as 0 or 1) and age is the only potential confounder. You might do the following:

            Code:
            sts graph, by(exposure) adjustfor(age)
            What Stata does behind the scenes is generate the predicted baseline survival curves (i.e., the fitted survival curves at age 0) from the following Cox models:

            Code:
            stcox age if exposure==0
            stcox age if exposure==1
            From the sts manual: "When you type by(group) adjustfor(vars), sts fits a separate Cox proportional hazards model on vars (estimation via stcox) and retrieves the separately estimated baseline survivor functions."
            If your study participants are adults then predictions at age=0 may not be of interest. If you are also adjusting for year, then you will get predictions at year 0 and age 0. Transforming the confounder variables by centering is nothing more than subtracting some value of age that is relevant for your data. For example:

            Code:
            generate age45=age-45
            sts graph, by(exposure) adjustfor(age45)
            Your predicted curves will now be for patients aged 45.

            If you do use this approach, then please don't report them as "adjusted survival curves"; there are many different ways to adjust and that statement doesn't give much information. Instead, report something like "predicted survival curves for patients aged 45 from separate Cox models for the exposed and unexposed". Fitting separate Cox models is important, since it avoids an assumption of proportional hazards for exposure. We are, however, still making other assumptions (e.g., linear effect of age and proportional hazards for age).

            I realise you don't want predictions for specific values of confounders. My understanding is that -stcurve- also gives exactly that (or am I missing something?). My understanding is that -stcurv- after -stcox- will, by default, give the predicted survival functions at the average value of the confounders. An advantage of -stcurv- is that one can use the -at()- option rather than centering, but one is still getting estimates for specified values of confounders (i.e., conditional rather than the desired marginal estimates).

            To get the desire marginal estimates, the procedure is to predict the survival curve for each individual assuming everyone is exposed (one predicted curve for every observation) and then average those curves. Then repeat the procedure assuming everyone is unexposed. You then have two curves which are standardised to the confounder distribution in the population. Paul Lambert's -standsurv- command (link above) makes this very easy to do in practice. Even if you are not using that command, that page illustrates the concepts.

            Comment


            • #7
              Hi everyone!

              Thank you all so much!

              The graph that I am having with -stcurve- is different from the one with sts graph in the sense that with stcurve (1) it looks like I have more steps and (2) the graph title is Cox proportional hazards regression.

              My question is basically: does stcurve is really plotting an adjusted KAPLAN MEIER? Can I title the graph Adjusted KAPLAN MEIER?

              Thank you again!

              Javier

              Comment

              Working...
              X