Announcement

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

  • Indicating written prediction intervals in forrest plots with subgroups

    Dear Statalist community,

    I need help with indicating prediction intervals in forest plots using the meta forest command in Stata Version 17.0! Please be gentle with me, since I don’t have much experience with Stata yet

    Basically, what I want is a forest plot that includes meta-analysis of several outcomes (which I have done by using the subgroup command). The plot should also include a graphical representation of the prediction intervals, as well as the written prediction interval (the actual numbers) - and here is where I struggle. I found a way to include the written prediction intervals at the end of the plot by using the customoverall() command, but I would want them to be given under the heterogeneity statistics for each outcome/ “subgroup”. Please see an example plot attached, which should hopefully make it easier to understand what I am trying to say. Below is the code I used to generate the plot:

    Code:
    Code:
    version 17
    
    meta forest _id Tool _plot _esci if Posttreatment == 1 & Direction == 1, random(reml) subgroup(Outcome_all) predinterval(95, lcolor(sienna)) nullrefline (favorsleft("Favors Comparison", color(maroon)) favorsright("Favors Intervention", color(green))) columnopts (Tool, title("Measure")) noomarker noohetstats noohomtest noosigtest nogbhomtests nooverall columnopts(_lb, mask("[%4.2f")) columnopts(_ub, mask("%4.2f]")) cibind(none) gmarkeropts(mcolor(sienna)) insidemarker(mcolor(sienna)) nogwhomtests nogsigtests customoverall(0.38 -0.4 1.18, label {bf:95%PI Restraint}”))
    The variables Posttreatment and Direction specify which outcomes should be plotted at which timepoint, since I will be performing several plots for different timepoints and outcomes.

    Do let me know if you think what I am asking is possible with the meta forest command.

    In a perfect world, it would also be nice if I could indicate both the CI whiskers and the PI whiskers over one another (overlay in maybe different colours) where I currently am only showing the PI line. However, this would just be a bonus.

    Thank you so much for your help!

    BW

    Laura

    Click image for larger version

Name:	Prediction Intervals.png
Views:	1
Size:	102.7 KB
ID:	1724620
Working...
X