I performed a subgroup meta-analysis of proportion using the metan command in Stata ver 17.0 and generated a forestplot. The forestplot shows I2 reported with its p-value. However, I need to report it with a 95% CI. The log file does not show the 95% CI. Using the suggestion of just adding the option i2ci at the end of the code produeces an error. Without adding i2ci, the forestplot is produced correctly.
We also ran sensitivity analysis using the Generalised Linear Mixed Model (GLMM) with a logit link and the Hartung-Knapp_Sidik_Jonkman (HKSJ) adjustment. Adding i2ci at the end of the working codes resulted in the same error
***main analysis code begin***
metan discordant_pairs total_household _pairs, pr model(ivhet) transform(fturkey, iv) study(study) by(tbincidence_category) sortby(tbincidence_id) forestplot(astext(40) textsize(100) boxscale(50) spacing(1.2) leftjustify range(0 1) dp(2)) extraline(yes) hetinfo(isq h) i2ci
***main analysis code end***
***begin sensitivity analysis code with GLMM with a logit link***
metapreg discordant_pairs total_household _pairs, model(random) studyid(study) lin(logit) by(tbincidence_category) sortby(tnincidence_id) fplot xlabel(0, o.5, 1) texts(1.6) i2ci
***end of sensitivity analysis with GLMM**
***begin sesitivity analysis with HKSJ***
sort tbincidence_id study
meta esize discordant_pairs total_household_pairs, esize(logitprop) zerocells(0.5, only0) studylabel(study)
meta summarise, random(reml) se(khartung) subgroup(tbincidnece_category)
meta forestplot, subgroup(tbincidence_category) transform(invlogit) nullrefine(lcolor(red) lpattern(dash)) xlabel(0 0.5 1, labsize(vlarge)) xsize(9) ysize(12) graphregin(margin(b=25)) i2ci
***end of HKSJ sensitivity analysis***
***begin of error***
option i2ci not allowed
Error in forestplot
r(198);
***end of error***
We also ran sensitivity analysis using the Generalised Linear Mixed Model (GLMM) with a logit link and the Hartung-Knapp_Sidik_Jonkman (HKSJ) adjustment. Adding i2ci at the end of the working codes resulted in the same error
***main analysis code begin***
metan discordant_pairs total_household _pairs, pr model(ivhet) transform(fturkey, iv) study(study) by(tbincidence_category) sortby(tbincidence_id) forestplot(astext(40) textsize(100) boxscale(50) spacing(1.2) leftjustify range(0 1) dp(2)) extraline(yes) hetinfo(isq h) i2ci
***main analysis code end***
***begin sensitivity analysis code with GLMM with a logit link***
metapreg discordant_pairs total_household _pairs, model(random) studyid(study) lin(logit) by(tbincidence_category) sortby(tnincidence_id) fplot xlabel(0, o.5, 1) texts(1.6) i2ci
***end of sensitivity analysis with GLMM**
***begin sesitivity analysis with HKSJ***
sort tbincidence_id study
meta esize discordant_pairs total_household_pairs, esize(logitprop) zerocells(0.5, only0) studylabel(study)
meta summarise, random(reml) se(khartung) subgroup(tbincidnece_category)
meta forestplot, subgroup(tbincidence_category) transform(invlogit) nullrefine(lcolor(red) lpattern(dash)) xlabel(0 0.5 1, labsize(vlarge)) xsize(9) ysize(12) graphregin(margin(b=25)) i2ci
***end of HKSJ sensitivity analysis***
***begin of error***
option i2ci not allowed
Error in forestplot
r(198);
***end of error***
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str27 study int(discordant_pairs total_household_pairs) str6 tbincidence_category byte tbincidence_id "Behr et al., 1998" 9 34 "<20" 1 "Bennett et al., 2002" 80 260 "<20" 1 "Blanco-Guillot et al., 2018" 6 29 "20-100" 2 "Borrell et al., 2009" 4 11 "20-100" 2 "Cavany et al., 2018" 12 44 "<20" 1 "Chen et al., 2022" 5 11 "20-100" 2 "Colangeli et al., 2020" 13 41 "20-100" 2 "Conceicao et al., 2018" 8 36 "20-100" 2 "Dale et al., 2022" 4 16 "<20" 1 "Dheda et al., 2017 " 8 21 ">100" 3 end

) to have this information directly displayed on the forest plot; but metan's forest plots are designed to be flexible, and to incorporate any information you desire, with a little work (see help forestplot).
Comment