Announcement

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

  • Extract estimates, cis and z-scores after meta analysis

    Hi,

    I have several meta-analysis (68) that I need to re-run and extract into an excel file the following for each one of the 68 meta-analyses:

    pooled estimates [r(theta)]
    cis of the pooled estimates [r(ci_lb)], [r(ci_ub)] and
    z-statistic[r(z)]


    The var id indicates the specific meta-analysis study groups

    The proposed commands for a tedious manual extraction of the scalars are below:
    Code:
    meta set estimate lci uci,civartolerance(.2)
    meta summarize if id==26
    meta summarize if id==33
    .....................
    meta summarize if id==N
    Using StataNow BE version 19.5

    I would be grateful if you could help me automate this task.

    Thank you,

    Nikos

    Please see below the data structure:

    . dataex id trial effect_measure estimate lci uci in 1/31

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int id str23 trial long effect_measure double(estimate lci    uci)
    26 "Qadir 2017"         3  19.27  -87.52 126.06
    26 "Dhiman 2015"        3 342.17  312.21 372.13
    26 "Oktay 1992"         3     69      57     81
    26 "Yassaei 2018"       3 -23.35  -82.42  35.72
    26 "Endo 2010"          3   1.45 -102.86 105.76
    33 "Jain  2014"         3   -.33   -1.71   1.05
    33 "Polat-Ozsoy 2011"   3    .15    -.25    .55
    33 "Ma 2013"            3   -.34   -1.07    .39
    33 "Deguchi 2008"       3   -1.1   -2.43    .23
    33 "Gurlen 2016"        3  -1.22    -1.9   -.54
    33 "Senisik 2012"       3   -.17    -.85    .51
    33 "El Namrawy 2019"    3     .3    -.27    .87
    33 "Karagoz 2013"       3    -.7   -1.46    .06
    33 "Gupta 2017"         3    .04    -.99   1.07
    33 "Jain  2014"         3  -1.53   -2.29   -.77
    34 "Xue 2020"           3    .01       0    .02
    34 "Kim 2017"           3    .09     .06    .12
    34 "Bochour 2022"       3     .1     .09    .11
    34 "Shin 2021"          3    .11     .09    .13
    34 "Faust-Matoses 2021" 3  -.065    -.07   -.06
    34 "Pottier 2020"       3     .2     .18    .22
    34 "Niu 2021"           3    .07     .06    .08
    36 "Polo 2008"          3  -5.11  -5.738 -4.482
    36 "Sucupira 2012"      3  -3.04  -5.561  -.519
    36 "Gupta 2019"         3   -4.3  -5.378 -3.322
    36 "Suber 2013"         3  -4.35  -5.378 -3.322
    36 "Somaiah 2013"       3  -3.75  -4.544 -2.956
    36 "Hexsel 2020a"       3   -1.1  -2.051  -.149
    36 "Hexcel 2020b"       3   -2.4  -3.421 -1.379
    36 "Oliviera 2021"      3  -3.76  -4.497 -3.023
    36 "Skaria 2020"        3 -1.225  -1.566  -.884
    end
    label values effect_measure effect_measure1
    label def effect_measure1 3 "md", modify

    Last edited by Nikolaos Pandis; 17 Jan 2026, 02:20.

  • #2
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int id str23 trial long effect_measure double(estimate lci    uci)
    26 "Qadir 2017"         3  19.27  -87.52 126.06
    26 "Dhiman 2015"        3 342.17  312.21 372.13
    26 "Oktay 1992"         3     69      57     81
    26 "Yassaei 2018"       3 -23.35  -82.42  35.72
    26 "Endo 2010"          3   1.45 -102.86 105.76
    33 "Jain  2014"         3   -.33   -1.71   1.05
    33 "Polat-Ozsoy 2011"   3    .15    -.25    .55
    33 "Ma 2013"            3   -.34   -1.07    .39
    33 "Deguchi 2008"       3   -1.1   -2.43    .23
    33 "Gurlen 2016"        3  -1.22    -1.9   -.54
    33 "Senisik 2012"       3   -.17    -.85    .51
    33 "El Namrawy 2019"    3     .3    -.27    .87
    33 "Karagoz 2013"       3    -.7   -1.46    .06
    33 "Gupta 2017"         3    .04    -.99   1.07
    33 "Jain  2014"         3  -1.53   -2.29   -.77
    34 "Xue 2020"           3    .01       0    .02
    34 "Kim 2017"           3    .09     .06    .12
    34 "Bochour 2022"       3     .1     .09    .11
    34 "Shin 2021"          3    .11     .09    .13
    34 "Faust-Matoses 2021" 3  -.065    -.07   -.06
    34 "Pottier 2020"       3     .2     .18    .22
    34 "Niu 2021"           3    .07     .06    .08
    36 "Polo 2008"          3  -5.11  -5.738 -4.482
    36 "Sucupira 2012"      3  -3.04  -5.561  -.519
    36 "Gupta 2019"         3   -4.3  -5.378 -3.322
    36 "Suber 2013"         3  -4.35  -5.378 -3.322
    36 "Somaiah 2013"       3  -3.75  -4.544 -2.956
    36 "Hexsel 2020a"       3   -1.1  -2.051  -.149
    36 "Hexcel 2020b"       3   -2.4  -3.421 -1.379
    36 "Oliviera 2021"      3  -3.76  -4.497 -3.023
    36 "Skaria 2020"        3 -1.225  -1.566  -.884
    end
    label values effect_measure effect_measure1
    
    meta set estimate lci uci,civartolerance(.2)
    
    gen theta = .
    gen id_lb = .
    gen id_ub = .
    gen z = .
    levelsof id, local(ids)
    foreach i of local ids {
        meta summarize if id == `i'
        replace theta = r(theta) if id == `i'
        replace id_lb = r(ci_lb) if id == `i'
        replace id_ub = r(ci_ub) if id == `i'
        replace z = r(z) if id == `i'
    }
    If you then wish to reduce the data set to a single observation per id containing just the metanalyses' results:

    Code:
    keep id theta id_lb id_ub z
    duplicates drop
    Last edited by Clyde Schechter; 17 Jan 2026, 09:46.

    Comment


    • #3
      Dear Clyde,
      Thank you that was great!
      Best,
      Nikos

      Comment

      Working...
      X