Announcement

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

  • meta set: sample size and event number in forest plots for declared effect sizes

    Is there a way to add sample size and event numbers in a forest plot when using meta set and pre delcared effect sizes? I just want to be able to show n/N for each treatment group within each study in addition to the precalculated HRs in a forest plot.

    Thanks!

  • #2
    See if how I do it here is satisfactory. You may want to italicize the statistics, i.e., write "{it:n/N}" in place of "n/N".

    Comment


    • #3
      In addition to Andrew's helpful advice, I have modified the example in the link he provided to show how to add a new (arbitary) column. Indeed, the manual for -meta forestplot- instructs that you may add any columns to the plot in addition to the automatic variables created for the meta-analysis.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str12 study float year str20 country float(cohorts participants cases rr rrlow rrup logrr logrrl logrru) byte _meta_id str12 _meta_studylabel float _meta_es double(_meta_se _meta_cil _meta_ciu _meta_weight)
      "Ericson"      2015 "Sweden"               1  26930  2860  .93 .89  .98  -.07257068 -.11653383 -.020202687 1 "Ericson"       -.07257068 .024574722931540643  -.12073625344783068  -.02440510969609022  894.3519672236014
      "Buijsse"      2015 "Multi-country (EPIC)" 8  25307 11059  .94  .9  .98  -.06187541 -.10536055 -.020202687 2 "Buijsse"       -.06187541 .021724342610256155   -.1044543357565999 -.019296477548778057 1014.0362069741808
      "Guasch-Ferre" 2015 "USA"                  1 145087  9652  .98 .94 1.02 -.020202687 -.06187541   .01980261 3 "Guasch-Ferre" -.020202687 .020836611477435422 -.061041695065796375  .020636321045458317 1054.4347766510025
      "Monbonen"     2005 "Finland"              1   4304   383 1.04 .94 1.15   .03922068 -.06187541   .13976192 4 "Monbonen"       .03922068 .051439039948394695  -.06159798987209798   .14003934152424335  316.4370854931246
      end
      
      gen events = strofreal(cases) + "/" + strofreal(participants)
      
      meta set logrr logrrl logrru, civarlevel(95) civartolerance(0.008) studylabel(study) eslabel(logRR) studysize(participants)
      
      meta forestplot _id events _plot _esci _weight, eform(risk ratios) random(dlaird) col(event , title("n/N"))

      Comment


      • #4
        Thank you! Adding the extra column worked.

        Comment

        Working...
        X