---------------------------------------------------------------------------------------------------- name: log: /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/02_STATA/ > logs/09_subgroups_metareg.log log type: text opened on: 8 Sep 2026, 08:50:30 . . di as txt "==================================================================" ================================================================== . di as txt "09: SUBGROUP ANALYSES AND META-REGRESSION METHODOLOGICAL AUDIT" 09: SUBGROUP ANALYSES AND META-REGRESSION METHODOLOGICAL AUDIT . di as txt "==================================================================" ================================================================== . . use "06_FINAL_ANALYSIS_V26/01_DATA/opioid_24h_primary.dta", clear . keep if inc_primary == 1 (9 observations deleted) . . meta set md_mme se_mme, studylabel(study_unit) eslabel("Mean Difference (mg IV MME)") Meta-analysis setting information Study information No. of studies: 7 Study label: study_unit Study size: N/A Effect size Type: Label: Mean Difference (mg IV MME) Variable: md_mme Precision Std. err.: se_mme CI: [_meta_cil, _meta_ciu] CI level: 95% Model and method Model: Random effects Method: REML . . * ------------------------------------------------------------------------------ . * 1. MODALITY SUBGROUP ANALYSIS: TEAS VS EA (k=7) . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "1. MODALITY SUBGROUP ANALYSIS: TEAS vs EA (k=7) [REML + Hartung-Knapp]" 1. MODALITY SUBGROUP ANALYSIS: TEAS vs EA (k=7) [REML + Hartung-Knapp] . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . meta summarize, random(reml) se(kh) subgroup(modality) Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study_unit Subgroup meta-analysis summary Number of studies = 7 Random-effects model Method: REML SE adjustment: Knapp–Hartung Group: modality Effect size: Mean Difference (mg IV MME) ---------------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight --------------------------+------------------------------------------------- Group: EA | El-Rakshy 2009 | -1.600 -8.888 5.688 13.83 Seevaunnamtum 2016 | -12.560 -21.162 -3.958 13.27 Yang 2024 | -0.300 -1.703 1.103 15.44 | theta | -3.936 -19.773 11.902 --------------------------+------------------------------------------------- Group: TEAS | Chen 1998 | -21.000 -32.962 -9.038 11.69 Chen 2020 | -28.190 -31.681 -24.699 15.09 He 2026 (hepatectomy/JIS) | -0.600 -1.733 0.533 15.47 Szmit 2021 | -7.700 -10.623 -4.777 15.21 | theta | -13.995 -34.181 6.190 --------------------------+------------------------------------------------- Overall | theta | -9.907 -20.079 0.265 ---------------------------------------------------------------------------- Heterogeneity summary ----------------------------------------------------------------------------- Group | df Q P > Q tau2 % I2 H2 ---------------+------------------------------------------------------------- EA | 2 7.67 0.022 28.471 77.15 4.38 TEAS | 3 232.89 0.000 156.882 98.59 70.96 ---------------+------------------------------------------------------------- Overall | 6 254.61 0.000 113.911 98.57 69.89 ----------------------------------------------------------------------------- Test of group differences: Q_b = chi2(1) = 1.87 Prob > Q_b = 0.172 . . * Subgroup forest plot . meta forestplot, subgroup(modality) /// > title("Primary 24-h Opioid Consumption by Modality (mg IV MME)", size(medium)) /// > subtitle("Random-Effects REML + Hartung-Knapp (k=7)", size(small)) /// > nullrefline nonotes Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study_unit . graph export "06_FINAL_ANALYSIS_V26/04_FIGURES/forest_subgroup_modality_primary.png", width(1800) > replace file /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/04_FIGURES/fores > t_subgroup_modality_primary.png saved as PNG format . . * ------------------------------------------------------------------------------ . * 2. COMPARATOR TYPE SUBGROUP: SHAM VS USUAL CARE (k=7) . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "2. COMPARATOR TYPE SUBGROUP: SHAM vs USUAL CARE (k=7)" 2. COMPARATOR TYPE SUBGROUP: SHAM vs USUAL CARE (k=7) . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . meta summarize, random(reml) se(kh) subgroup(comparator_type) Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study_unit Subgroup meta-analysis summary Number of studies = 7 Random-effects model Method: REML SE adjustment: Knapp–Hartung Group: comparator_type Effect size: Mean Difference (mg IV MME) ---------------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight --------------------------+------------------------------------------------- Group: Sham | Chen 1998 | -21.000 -32.962 -9.038 11.69 Chen 2020 | -28.190 -31.681 -24.699 15.09 He 2026 (hepatectomy/JIS) | -0.600 -1.733 0.533 15.47 Szmit 2021 | -7.700 -10.623 -4.777 15.21 | theta | -13.995 -34.181 6.190 --------------------------+------------------------------------------------- Group: Usual Care / Cont~l| El-Rakshy 2009 | -1.600 -8.888 5.688 13.83 Seevaunnamtum 2016 | -12.560 -21.162 -3.958 13.27 Yang 2024 | -0.300 -1.703 1.103 15.44 | theta | -3.936 -19.773 11.902 --------------------------+------------------------------------------------- Overall | theta | -9.907 -20.079 0.265 ---------------------------------------------------------------------------- Heterogeneity summary ----------------------------------------------------------------------------- Group | df Q P > Q tau2 % I2 H2 ---------------+------------------------------------------------------------- Sham | 3 232.89 0.000 156.882 98.59 70.96 Usual Care /~l | 2 7.67 0.022 28.471 77.15 4.38 ---------------+------------------------------------------------------------- Overall | 6 254.61 0.000 113.911 98.57 69.89 ----------------------------------------------------------------------------- Test of group differences: Q_b = chi2(1) = 1.87 Prob > Q_b = 0.172 . . * ------------------------------------------------------------------------------ . * 3. META-REGRESSION METHODOLOGICAL ASSESSMENT . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "3. META-REGRESSION METHODOLOGICAL ASSESSMENT & POWER AUDIT" 3. META-REGRESSION METHODOLOGICAL ASSESSMENT & POWER AUDIT . di as txt "According to Cochrane Handbook (Section 10.11.4), meta-regression" According to Cochrane Handbook (Section 10.11.4), meta-regression . di as txt "should generally NOT be considered unless there are at least 10 studies" should generally NOT be considered unless there are at least 10 studies . di as txt "for each study-level covariate. Here, k=7 (TEAS k=4, EA k=3)." for each study-level covariate. Here, k=7 (TEAS k=4, EA k=3). . di as txt "Executing exploratory meta-regression on modality for completeness:" Executing exploratory meta-regression on modality for completeness: . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . . * Capture each modality stratum FROM THE DATA rather than transcribing it. . * These rows were previously hardcoded literals (estimate = -6.69786 etc.), which . * silently failed to track the underlying dataset - exposed when the sufentanil . * conversion factor was corrected on 2026-09-07 and OP24_TEAS_SHAM moved while . * SUB_MODALITY_TEAS did not. Now computed, so the two can never diverge again. . meta summarize if modality == "TEAS", random(reml) se(kh) Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study_unit Meta-analysis summary Number of studies = 4 Random-effects model Heterogeneity: Method: REML tau2 = 156.8823 SE adjustment: Knapp–Hartung I2 (%) = 98.59 H2 = 70.96 Effect size: Mean Difference (mg IV MME) ---------------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight --------------------------+------------------------------------------------- Chen 1998 | -21.000 -32.962 -9.038 21.42 Chen 2020 | -28.190 -31.681 -24.699 25.98 He 2026 (hepatectomy/JIS) | -0.600 -1.733 0.533 26.45 Szmit 2021 | -7.700 -10.623 -4.777 26.14 --------------------------+------------------------------------------------- theta | -13.995 -34.181 6.190 ---------------------------------------------------------------------------- Test of theta = 0: t(3) = -2.21 Prob > |t| = 0.1145 Test of homogeneity: Q = chi2(3) = 232.89 Prob > Q = 0.0000 . matrix res_teas = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2)) . . meta summarize if modality == "EA", random(reml) se(kh) Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study_unit Meta-analysis summary Number of studies = 3 Random-effects model Heterogeneity: Method: REML tau2 = 28.4713 SE adjustment: Knapp–Hartung I2 (%) = 77.15 H2 = 4.38 Effect size: Mean Difference (mg IV MME) --------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight -------------------+------------------------------------------------- El-Rakshy 2009 | -1.600 -8.888 5.688 29.89 Seevaunnamtum 2016 | -12.560 -21.162 -3.958 26.49 Yang 2024 | -0.300 -1.703 1.103 43.62 -------------------+------------------------------------------------- theta | -3.936 -19.773 11.902 --------------------------------------------------------------------- Test of theta = 0: t(2) = -1.07 Prob > |t| = 0.3969 Test of homogeneity: Q = chi2(2) = 7.67 Prob > Q = 0.0216 . matrix res_ea = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2)) . . encode modality, gen(modality_code) . * 1=EA, 2=TEAS . meta regress i.modality_code, random(reml) se(kh) Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Random-effects meta-regression Number of obs = 7 Method: REML Residual heterogeneity: SE adjustment: Knapp–Hartung tau2 = 110.2 I2 (%) = 97.20 H2 = 35.73 R-squared (%) = 3.22 Model F(1,5) = 1.29 Prob > F = 0.3079 ------------------------------------------------------------------------------- _meta_es | Coefficient Std. err. t P>|t| [95% conf. interval] --------------+---------------------------------------------------------------- modality_code | TEAS | -9.324212 8.215591 -1.13 0.308 -30.44306 11.79464 _cons | -4.537925 6.228398 -0.73 0.499 -20.54853 11.47268 ------------------------------------------------------------------------------- Test of residual homogeneity: Q_res = chi2(5) = 240.56 Prob > Q_res = 0.0000 . matrix res_metareg = (r(table)[1,2], r(table)[2,2], r(table)[5,2], r(table)[6,2], r(table)[4,2], r > (N), r(tau2), r(I2)) . . di as txt _n "AUDIT CONCLUSION: Meta-regression with k=7 is severely underpowered" AUDIT CONCLUSION: Meta-regression with k=7 is severely underpowered . di as txt "and subject to extreme risk of false-positive / false-negative conclusions." and subject to extreme risk of false-positive / false-negative conclusions. . di as txt "Stratified subgroup presentation with Hartung-Knapp adjustment is authoritative." Stratified subgroup presentation with Hartung-Knapp adjustment is authoritative. . . * ------------------------------------------------------------------------------ . * 4. EXPORT SUBGROUP AND META-REGRESSION AUDIT SUMMARY . * ------------------------------------------------------------------------------ . clear . set obs 3 Number of observations (_N) was 0, now 3. . . gen analysis_id = "" (3 missing values generated) . gen analysis_type = "" (3 missing values generated) . gen subgroup_variable = "" (3 missing values generated) . gen k = . (3 missing values generated) . gen estimate = . (3 missing values generated) . gen ci_low = . (3 missing values generated) . gen ci_high = . (3 missing values generated) . gen p_value = . (3 missing values generated) . gen tau2 = . (3 missing values generated) . gen i2 = . (3 missing values generated) . gen notes = "" (3 missing values generated) . . * Row 1: TEAS Stratum . replace analysis_id = "SUB_MODALITY_TEAS" in 1 variable analysis_id was str1 now str17 (1 real change made) . replace analysis_type = "Subgroup" in 1 variable analysis_type was str1 now str8 (1 real change made) . replace subgroup_variable = "Modality: TEAS (Chen 1998, Chen 2020, He 2026)" in 1 variable subgroup_variable was str1 now str46 (1 real change made) . replace k = res_teas[1,5] in 1 (1 real change made) . replace estimate = res_teas[1,1] in 1 (1 real change made) . replace ci_low = res_teas[1,2] in 1 (1 real change made) . replace ci_high = res_teas[1,3] in 1 (1 real change made) . replace p_value = res_teas[1,4] in 1 (1 real change made) . replace tau2 = res_teas[1,6] in 1 (1 real change made) . replace i2 = res_teas[1,7] in 1 (1 real change made) . replace notes = "REML + Hartung-Knapp (t df=2)" in 1 variable notes was str1 now str29 (1 real change made) . . * Row 2: EA Stratum . replace analysis_id = "SUB_MODALITY_EA" in 2 (1 real change made) . replace analysis_type = "Subgroup" in 2 (1 real change made) . replace subgroup_variable = "Modality: EA (El-Rakshy 2009, Seevaunnamtum 2016, Yang 2024)" in 2 variable subgroup_variable was str46 now str60 (1 real change made) . replace k = res_ea[1,5] in 2 (1 real change made) . replace estimate = res_ea[1,1] in 2 (1 real change made) . replace ci_low = res_ea[1,2] in 2 (1 real change made) . replace ci_high = res_ea[1,3] in 2 (1 real change made) . replace p_value = res_ea[1,4] in 2 (1 real change made) . replace tau2 = res_ea[1,6] in 2 (1 real change made) . replace i2 = res_ea[1,7] in 2 (1 real change made) . replace notes = "REML + Hartung-Knapp (t df=2)" in 2 (1 real change made) . . * Row 3: Meta-regression on Modality . replace analysis_id = "METAREG_MODALITY" in 3 (1 real change made) . replace analysis_type = "Meta-regression" in 3 variable analysis_type was str8 now str15 (1 real change made) . replace subgroup_variable = "Modality: TEAS vs EA (reference: EA)" in 3 (1 real change made) . replace k = res_metareg[1,6] in 3 (0 real changes made) . replace estimate = res_metareg[1,1] in 3 (1 real change made) . replace ci_low = res_metareg[1,3] in 3 (1 real change made) . replace ci_high = res_metareg[1,4] in 3 (1 real change made) . replace p_value = res_metareg[1,5] in 3 (1 real change made) . replace tau2 = res_metareg[1,7] in 3 (0 real changes made) . replace i2 = res_metareg[1,8] in 3 (0 real changes made) . replace notes = "Difference between TEAS and EA; underpowered (k=7 < 10)" in 3 variable notes was str29 now str55 (1 real change made) . . save "06_FINAL_ANALYSIS_V26/03_RESULTS/results_subgroups_metareg.dta", replace file 06_FINAL_ANALYSIS_V26/03_RESULTS/results_subgroups_metareg.dta saved . export delimited "06_FINAL_ANALYSIS_V26/03_RESULTS/results_subgroups_metareg.csv", replace file 06_FINAL_ANALYSIS_V26/03_RESULTS/results_subgroups_metareg.csv saved . list, clean analysis_id analysis_type subgroup_var > iable k estimate ci_low ci_high p_value tau2 i2 > notes 1. SUB_MODALITY_TEAS Subgroup Modality: TEAS (Chen 1998, Chen 2020, He > 2026) 4 -13.99528 -34.18084 6.190291 .1144761 156.8823 98.59068 > REML + Hartung-Knapp (t df=2) 2. SUB_MODALITY_EA Subgroup Modality: EA (El-Rakshy 2009, Seevaunnamtum 2016, Yang > 2024) 3 -3.935834 -19.77322 11.90155 .3968947 28.47128 77.15261 > REML + Hartung-Knapp (t df=2) 3. METAREG_MODALITY Meta-regression Modality: TEAS vs EA (reference > : EA) . -9.324212 -30.44306 11.79464 .30786 . . Difference between > TEAS and EA; underpowered (k=7 < 10) . . di as txt _n "SUCCESS: Subgroup and meta-regression analyses completed and exported." SUCCESS: Subgroup and meta-regression analyses completed and exported. . log close name: log: /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/02_STATA/ > logs/09_subgroups_metareg.log log type: text closed on: 8 Sep 2026, 08:50:31 ----------------------------------------------------------------------------------------------------