Announcement

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

  • Meta-analysis: Weights in each subgroup adding up to 100%

    I am doing subgroup meta-analyses and previously with "metan" commands, I could use "sgweight" to ensure the weights in each subgroup to add up to 100%.

    How can I do the same with the newer commands - meta set, meta summarize, meta forestplot in Stata v17?
    Any advice on how I can convert the new weight variable "_meta_weight" to a percentage variable (/100 or %)?

    Many thanks in advance for any advice/assistance!

  • #2
    There are a lot of equivalent ways of presenting the same weights for a given meta-analysis. Stata's -meta- suite presents the percentage weight over to the total weight over all studies from all subgroups. The absolute weight is stored in a system variable called -_meta_weight-, after setting up the meta-analysis with -meta set-. You can compute the weights as percentages over the total subgroup weight, but then you also need to present total (percent or absolute) weight within each subgroup somehow.

    Start at "Start here"

    Code:
    clear *
    cls
    
    webuse pupiliq
    meta set stdmdiff se
    meta summarize, subgroup(week1)
    sort week1 study
    
    * Start here
    
    * compute total weight, and percentage weight over grand total.
    egen total_wt = sum(_meta_weight)
    gen pct_total_wt = 100 * _meta_weight / total_wt
    tabstat pct_total_wt , c(s) s(sum)
    
    * compute total weight within subgoups, and percentage weight within subgroups
    bys week1 (study) : egen grp_wt = sum(_meta_weight)
    gen pct_grp_wt = 100 * _meta_weight / grp_wt
    tabstat pct_grp_wt , by(week1) c(s) s(sum)
    
    * compare computed weights with meta
    list studylbl _meta_weight total_wt pct_total_wt grp_wt pct_grp_wt, abbrev(20)
    Selected output:

    Code:
    . meta summarize, subgroup(week1)
    
    [output omitted]
    
    --------------------------------------------------------------------
                Study |    Effect size    [95% conf. interval]  % weight
    ------------------+-------------------------------------------------
    Group: <= 1 week  |
             Study  4 |          1.180       0.449       1.911      1.69
             Study  5 |          0.260      -0.463       0.983      1.72
             Study  9 |          0.270      -0.051       0.591      5.84
             Study 10 |          0.800       0.308       1.292      3.26
             Study 11 |          0.540      -0.052       1.132      2.42
             Study 12 |          0.180      -0.257       0.617      3.89
             Study 13 |         -0.020      -0.586       0.546      2.61
             Study 17 |          0.300       0.028       0.572      6.99
                      |
                theta |          0.373       0.189       0.557
    ------------------+-------------------------------------------------
    Group: > 1 week   |
             Study  1 |          0.030      -0.215       0.275      7.74
             Study  2 |          0.120      -0.168       0.408      6.60
             Study  3 |         -0.140      -0.467       0.187      5.71
             Study  6 |         -0.060      -0.262       0.142      9.06
             Study  7 |         -0.020      -0.222       0.182      9.06
             Study  8 |         -0.320      -0.751       0.111      3.97
             Study 14 |          0.230      -0.338       0.798      2.59
             Study 15 |         -0.180      -0.492       0.132      6.05
             Study 16 |         -0.060      -0.387       0.267      5.71
             Study 18 |          0.070      -0.114       0.254      9.64
             Study 19 |         -0.070      -0.411       0.271      5.43
                      |
                theta |         -0.021      -0.102       0.059
    ------------------+-------------------------------------------------
    Overall           |
                theta |          0.084      -0.018       0.185
    --------------------------------------------------------------------
    
    [output omitted]
    
    . list studylbl _meta_weight total_wt pct_total_wt grp_wt pct_grp_wt, abbrev(20)
    
         +-----------------------------------------------------------------------------------------------+
         |                   studylbl   _meta_weight    total_wt   pct_total_wt      grp_wt   pct_grp_wt |
         |-----------------------------------------------------------------------------------------------|
      1. |   Pellegrini & Hicks, 1972      6.3307695   374.79883      1.6891113   106.52903    5.9427647 |
      2. |   Pellegrini & Hicks, 1972      6.4520009   374.79883       1.721457   106.52903    6.0565659 |
      3. |               Kester, 1969      21.869549   374.79883      5.8350099   106.52903    20.529192 |
      4. |              Maxwell, 1970      12.220355   374.79883      3.2605106   106.52903    11.471385 |
      5. |               Carter, 1970      9.0881265   374.79883      2.4248012   106.52903    8.5311267 |
         |-----------------------------------------------------------------------------------------------|
      6. |              Flowers, 1966      14.586045   374.79883      3.8916997   106.52903    13.692085 |
      7. |              Keshock, 1970      9.7703308   374.79883        2.60682   106.52903    9.1715195 |
      8. | Rosenthal & Jacobson, 1968      26.211853   374.79883      6.9935791   106.52903    24.605361 |
      9. |     Rosenthal et al., 1974      29.023633   374.79883      7.7437897    268.2698    10.818822 |
     10. |          Conn et al., 1968      24.728799   374.79883      6.5978859    268.2698    9.2178841 |
         |-----------------------------------------------------------------------------------------------|
     11. |          Jose & Cody, 1971      21.404714   374.79883      5.7109875    268.2698    7.9788013 |
     12. |    Evans & Rosenthal, 1969      33.968914   374.79883      9.0632391    268.2698    12.662221 |
     13. |       Fielder et al., 1971      33.968914   374.79883      9.0632391    268.2698    12.662221 |
     14. |             Claiborn, 1969      14.874383   374.79883      3.9686311    268.2698     5.544561 |
     15. |            Henrikson, 1970      9.7153707   374.79883      2.5921561    268.2698    3.6214925 |
         |-----------------------------------------------------------------------------------------------|
     16. |                 Fine, 1972      22.670247   374.79883      6.0486439    268.2698      8.45054 |
     17. |              Grieger, 1970      21.404714   374.79883      5.7109875    268.2698    7.9788013 |
     18. |   Fleming & Anttonen, 1971      36.145867   374.79883      9.6440715    268.2698      13.4737 |
     19. |             Ginsburg, 1970      20.364243   374.79883      5.4333795    268.2698    7.5909562 |
         +-----------------------------------------------------------------------------------------------+
    Note that the "% Weight" column of -meta summarize- matches the weights computed in the -pct_total_wt- variable.

    Comment


    • #3
      Thank you so much for your help Leonardo!

      Comment

      Working...
      X