Announcement

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

  • Generating a survival curve with confidence intervals from multiple meta-analyses of survival data

    Good evening, and thanks in advance for any help you can provide.

    I'm trying to perform meta-analysis of implant survival following two types of hip replacement, based on published Kaplan-Meier estimates. I've generated Forest plots using metan that give a combined estimate of survival, with confidence intervals, at each year up to 7 years.

    In order to present this data in a more accessible manner, I would like to create a line graph (effectively a survival curve) with 95% confidence intervals. The X-axis would be time, and the Y-axis would be survival, as calculated from my meta-analyses.

    Whilst it might be possible to use exceptionally clever code to do this in a very neat manner, is there any way of just telling STATA what the coordinates of my desired points are, and their confidence intervals? Ideally I would like to be able to plot both hip replacement types on the same chart.

    In case it helps, here is the code for one of my Forest plots:

    #delimit ;
    metan dmc_km_allcause dmc_km_allcause_lower_ci dmc_km_allcause_upper_ci if dmc_mean_fu == 12 ,
    nohet effect(Survival) fixedi
    xlabel(0.75, 1)
    astext(50)
    boxopt(mfcol(gs50%50) )
    olineopt(lc(black)lp(dash))
    texts(95)
    lcols(first_author)
    title("Forest plot of estimates for reported survival of dual mobility constructs at one year" , c(black) margin(b+3) size (small))
    xtitle ("Survival estimate", c(black) margin(b+4) size (vsmall))
    graphregion( sty(none) c(white) ls(none) istyle(none) ic(white) margin(medium) )
    plotregion( sty(none) c(white) ls(none) istyle(none) ic(white) margin(medium) )
    xsize(4.2126)
    name(cs_metan_15,replace)
    ;
    Thanks again
    Hamish

  • #2
    In case it helps, this is the dataset that I would like to produce a graph of.

    time = time in months (X-axis)
    dmc_km = survival estimate of the first implant type
    dmc_km_lower_ci = lower 95% confidence interval for the first implant type
    control_km_upper_ci = upper 95% confidence interval for the first implant type
    control_km = survival estimate of the second implant type
    control_km_lower_ci = lower 95% confidence interval for the second implant type
    control_km_upper_ci = upper 95% confidence interval for the second implant type


    time dmc_km dmc_km_lower_ci dmc_km_upper_ci control_km control_km_lower_ci control_km_upper_ci
    0 1 1 1 1 1 1
    12 0.978 0.974 0.981 0.983 0.981 0.984
    24 0.97 0.966 0.975 0.977 0.976 0.979
    36 0.963 0.957 0.968 0.973 0.971 0.975
    48 0.957 0.95 0.964 0.973 0.971 0.975
    60 0.953 0.945 0.96 0.964 0.961 0.966
    72 0.946 0.937 0.955 0.965 0.961 0.968
    84 0.94 0.93 0.951 0.953 0.949 0.956
    Thanks
    Hamish

    Comment


    • #3
      Update. Appreciate I'm talking to myself a bit here, but someone else will probably have this problem at some point. I have solved my problem. The answer was here: https://www.statalist.org/forums/for...o-a-line-graph

      I used the following code:

      #delimit;
      twoway
      (line dmc_km time)
      (rcap dmc_km_lower_ci dmc_km_upper_ci time)
      (line control_km time)
      (rcap control_km_lower_ci control_km_upper_ci time)
      ;
      This may not be the most elegant way to achieve my outcome, but it seems to have worked.

      Cheers
      Hamish

      Comment

      Working...
      X