---------------------------------------------------------------------------------------------------- name: log: /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/02_STATA/ > logs/02_targetA_48h.log log type: text opened on: 8 Sep 2026, 08:50:25 . . di as txt "==================================================================" ================================================================== . di as txt "02: TARGET A: 0-48 H CUMULATIVE POSTOPERATIVE OPIOID CONSUMPTION" 02: TARGET A: 0-48 H CUMULATIVE POSTOPERATIVE OPIOID CONSUMPTION . di as txt "Model: Random-Effects REML + Hartung-Knapp (se(kh))" Model: Random-Effects REML + Hartung-Knapp (se(kh)) . di as txt "==================================================================" ================================================================== . . use "06_FINAL_ANALYSIS_V26/01_DATA/target_A_48h.dta", clear . describe Contains data from 06_FINAL_ANALYSIS_V26/01_DATA/target_A_48h.dta Observations: 5 Variables: 57 8 Sep 2026 08:50 ---------------------------------------------------------------------------------------------------- Variable Storage Display Value name type format label Variable label ---------------------------------------------------------------------------------------------------- lock_id str22 %22s lock_id target str18 %18s target endpoint_stra~m str35 %35s endpoint_stratum study str25 %25s study comparison_id str35 %35s comparison_id intervention str128 %128s intervention comparator str75 %75s comparator outcome str69 %69s outcome time_window str101 %101s time_window data_type str42 %42s data_type n_i int %10.0g n_i n_c int %10.0g n_c mean_i double %10.0g mean_i sd_i double %10.0g sd_i median_i double %10.0g median_i q1_i double %10.0g q1_i q3_i double %10.0g q3_i events_i byte %10.0g events_i mean_c double %10.0g mean_c sd_c double %10.0g sd_c median_c double %10.0g median_c q1_c double %10.0g q1_c q3_c double %10.0g q3_c events_c byte %10.0g events_c unit str57 %57s unit reported_p str54 %54s reported_p derived_effec~e str2 %9s derived_effect_measure derived_effect double %10.0g derived_effect rob_overall str13 %13s rob_overall include_strict byte %10.0g include_strict include_sensi~y byte %10.0g include_sensitivity narrative_only byte %10.0g narrative_only author_priority str2 %9s author_priority p1_disposition str33 %33s p1_disposition analysis_action str20 %20s analysis_action overlap_family str30 %30s overlap_family hold_reason str33 %33s hold_reason shared_contro~e str101 %101s shared_control_issue source_qc str179 %179s source_qc record_status str59 %59s record_status source_url str83 %83s source_url Sourceverifie~t str108 %108s Source-verified result rob_d1 str13 %13s D1 rob_d2 str13 %13s D2 rob_d3 str13 %13s D3 rob_d4 str13 %13s D4 rob_d5 str13 %13s D5 result_rob str13 %13s Overall RoB KeyQCnote str128 %128s Key QC note mme_factor float %9.0g mean_i_mme float %9.0g sd_i_mme float %9.0g mean_c_mme float %9.0g sd_c_mme float %9.0g is_median_con~d float %9.0g md_mme float %9.0g se_mme float %9.0g ---------------------------------------------------------------------------------------------------- Sorted by: . . * List all Target A entries . di as txt _n "=== ALL TARGET A STUDIES ===" === ALL TARGET A STUDIES === . list lock_id study comparison_id include_strict include_sensitivity n_i mean_i_mme sd_i_mme n_c me > an_c_mme sd_c_mme md_mme se_mme unit rob_overall, clean lock_id study comparison_id includ~t includ~y n_i mean_i~e > sd_i_mme n_c mean_c~e sd_c_mme md_mme se_mme unit rob_o > verall 1. A-001 Chen 2020 CHEN20_TEAS_vs_SHAM_SUF48 1 0 40 118.52 > 9.77 40 140.15 7.87 -21.63 1.983619 µg sufentanil Some co > ncerns 2. A-002 Zhang 2023 ZHANG23_TEAS_vs_SHAM_MME48 1 0 922 100 > 22.23903 916 103.3333 14.82602 -3.333336 .8811258 mg IV morphine-equivalent Some co > ncerns 3. A-003 An 2014 AN14_EA_vs_CTRL_FENT48 1 0 41 67 > 9 40 73 12 -6 2.361273 mg fentanyl Some co > ncerns 4. A-004 Xie 2014 XIE14_EAS_vs_SHAM_TOTALSUF 0 1 20 115 > 6 20 133.5 7 -18.5 2.061553 µg sufentanil Some co > ncerns 5. A-004 Xie 2014 XIE14_EAS_vs_CONTROL_TOTALSUF 0 1 20 115 > 6 20 134.3 5.9 -19.3 1.881622 µg sufentanil Some co > ncerns . . * Declare Meta-Analysis Setting for MME . meta set md_mme se_mme, studylabel(study) eslabel("Mean Difference (mg IV MME)") Meta-analysis setting information Study information No. of studies: 5 Study label: study 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. PRINCIPAL STRICT TARGET A MODEL (k=3: Chen 2020, Zhang 2023, An 2014) . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "1. STRICT TARGET A (k=3: Chen 2020, Zhang 2023, An 2014) [REML + KH]" 1. STRICT TARGET A (k=3: Chen 2020, Zhang 2023, An 2014) [REML + KH] . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . meta summarize if include_strict == 1, random(reml) se(kh) predinterval Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study Meta-analysis summary Number of studies = 3 Random-effects model Heterogeneity: Method: REML tau2 = 94.5600 SE adjustment: Knapp–Hartung I2 (%) = 97.07 H2 = 34.17 Effect size: Mean Difference (mg IV MME) -------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight ------------------+------------------------------------------------- Chen 2020 | -21.630 -25.518 -17.742 33.15 Zhang 2023 | -3.333 -5.060 -1.606 34.25 An 2014 | -6.000 -10.628 -1.372 32.61 ------------------+------------------------------------------------- theta | -10.268 -34.835 14.299 -------------------------------------------------------------------- 95% prediction interval for theta: [-153.550,133.014] Test of theta = 0: t(2) = -1.80 Prob > |t| = 0.2139 Test of homogeneity: Q = chi2(2) = 71.08 Prob > Q = 0.0000 . matrix res_strict = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2), r(Q), r(p_Q)) . . * ------------------------------------------------------------------------------ . * 2. MANDATORY SENSITIVITY: Exclude An 2014 (PCA plausibility concern) -> k=2 . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "2. MANDATORY SENSITIVITY: Exclude An 2014 -> k=2 (Chen 2020, Zhang 2023)" 2. MANDATORY SENSITIVITY: Exclude An 2014 -> k=2 (Chen 2020, Zhang 2023) . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . meta summarize if include_strict == 1 & study != "An 2014", random(reml) se(kh) predinterval Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study Meta-analysis summary Number of studies = 2 Random-effects model Heterogeneity: Method: REML tau2 = 165.0283 SE adjustment: Knapp–Hartung I2 (%) = 98.59 H2 = 71.06 Effect size: Mean Difference (mg IV MME) -------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight ------------------+------------------------------------------------- Chen 2020 | -21.630 -25.518 -17.742 49.53 Zhang 2023 | -3.333 -5.060 -1.606 50.47 ------------------+------------------------------------------------- theta | -12.395 -128.631 103.840 -------------------------------------------------------------------- 95% prediction interval for theta: [ ., .] Test of theta = 0: t(1) = -1.35 Prob > |t| = 0.4048 Test of homogeneity: Q = chi2(1) = 71.06 Prob > Q = 0.0000 . matrix res_noan = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2), r(Q), r(p_Q)) . . * ------------------------------------------------------------------------------ . * 3. SENSITIVITY: Exclude Median/IQR Converted Study (Zhang 2023) -> k=2 . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "3. SENSITIVITY: Exclude Converted Median/IQR (Zhang 2023) -> k=2" 3. SENSITIVITY: Exclude Converted Median/IQR (Zhang 2023) -> k=2 . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . meta summarize if include_strict == 1 & is_median_converted == 0, random(reml) se(kh) predinterval Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study Meta-analysis summary Number of studies = 2 Random-effects model Heterogeneity: Method: REML tau2 = 117.3932 SE adjustment: Knapp–Hartung I2 (%) = 96.11 H2 = 25.69 Effect size: Mean Difference (mg IV MME) -------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight ------------------+------------------------------------------------- Chen 2020 | -21.630 -25.518 -17.742 50.34 An 2014 | -6.000 -10.628 -1.372 49.66 ------------------+------------------------------------------------- theta | -13.867 -113.164 85.429 -------------------------------------------------------------------- 95% prediction interval for theta: [ ., .] Test of theta = 0: t(1) = -1.77 Prob > |t| = 0.3267 Test of homogeneity: Q = chi2(1) = 25.69 Prob > Q = 0.0000 . matrix res_noconv = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2), r(Q), r(p_Q)) . . * ------------------------------------------------------------------------------ . * 4. SENSITIVITY: Broader 48-h Window (Including Xie 2014 Sham Contrast) -> k=4 . * ------------------------------------------------------------------------------ . di as txt _n "------------------------------------------------------------------" ------------------------------------------------------------------ . di as txt "4. SENSITIVITY: Broader 48-h Window Including Xie 2014 (vs Sham) -> k=4" 4. SENSITIVITY: Broader 48-h Window Including Xie 2014 (vs Sham) -> k=4 . di as txt "------------------------------------------------------------------" ------------------------------------------------------------------ . * Keep one contrast for Xie 2014 (EAS vs Sham) . meta summarize if include_strict == 1 | comparison_id == "XIE14_EAS_vs_SHAM_TOTALSUF", random(reml > ) se(kh) predinterval Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study Meta-analysis summary Number of studies = 4 Random-effects model Heterogeneity: Method: REML tau2 = 79.1542 SE adjustment: Knapp–Hartung I2 (%) = 96.46 H2 = 28.21 Effect size: Mean Difference (mg IV MME) -------------------------------------------------------------------- Study | Effect size [95% conf. interval] % weight ------------------+------------------------------------------------- Chen 2020 | -21.630 -25.518 -17.742 24.90 Zhang 2023 | -3.333 -5.060 -1.606 25.88 An 2014 | -6.000 -10.628 -1.372 24.42 Xie 2014 | -18.500 -22.541 -14.459 24.80 ------------------+------------------------------------------------- theta | -12.302 -26.735 2.132 -------------------------------------------------------------------- 95% prediction interval for theta: [-55.269,30.665] Test of theta = 0: t(3) = -2.71 Prob > |t| = 0.0730 Test of homogeneity: Q = chi2(3) = 101.83 Prob > Q = 0.0000 . matrix res_broader = (r(theta), r(ci_lb), r(ci_ub), r(p), r(N), r(tau2), r(I2), r(Q), r(p_Q)) . . * ------------------------------------------------------------------------------ . * 5. GENERATE AND EXPORT FOREST PLOT . * ------------------------------------------------------------------------------ . meta forestplot if include_strict == 1, /// > title("TARGET A: 0-48h Cumulative Postoperative Opioid Consumption", size(medium)) /// > subtitle("Strict Set (StataNow 19.5 BE: REML + Hartung-Knapp, k=3)", size(small)) /// > nullrefline nonotes Effect-size label: Mean Difference (mg IV MME) Effect size: md_mme Std. err.: se_mme Study label: study . graph export "06_FINAL_ANALYSIS_V26/04_FIGURES/forest_targetA_48h_mme.png", width(1800) replace file /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/04_FIGURES/fores > t_targetA_48h_mme.png saved as PNG format . . * ------------------------------------------------------------------------------ . * 6. EXPORT SUMMARY ESTIMATES TO STATA DATASET & CSV . * ------------------------------------------------------------------------------ . clear . set obs 4 Number of observations (_N) was 0, now 4. . gen analysis_id = "" (4 missing values generated) . gen outcome = "0-48 h Cumulative Postoperative Opioid" . gen stratum = "" (4 missing values generated) . gen k = . (4 missing values generated) . gen estimate = . (4 missing values generated) . gen ci_low = . (4 missing values generated) . gen ci_high = . (4 missing values generated) . gen p_value = . (4 missing values generated) . gen tau2 = . (4 missing values generated) . gen i2 = . (4 missing values generated) . gen q_stat = . (4 missing values generated) . gen model = "REML + Hartung-Knapp" . . replace analysis_id = "TA_STRICT" in 1 variable analysis_id was str1 now str9 (1 real change made) . replace stratum = "Strict Target A (Chen, Zhang, An)" in 1 variable stratum was str1 now str33 (1 real change made) . replace estimate = res_strict[1,1] in 1 (1 real change made) . replace ci_low = res_strict[1,2] in 1 (1 real change made) . replace ci_high = res_strict[1,3] in 1 (1 real change made) . replace p_value = res_strict[1,4] in 1 (1 real change made) . replace k = res_strict[1,5] in 1 (1 real change made) . replace tau2 = res_strict[1,6] in 1 (1 real change made) . replace i2 = res_strict[1,7] in 1 (1 real change made) . replace q_stat = res_strict[1,8] in 1 (1 real change made) . . replace analysis_id = "TA_EXCL_AN" in 2 variable analysis_id was str9 now str10 (1 real change made) . replace stratum = "Mandatory Sensitivity: Exclude An 2014" in 2 variable stratum was str33 now str38 (1 real change made) . replace estimate = res_noan[1,1] in 2 (1 real change made) . replace ci_low = res_noan[1,2] in 2 (1 real change made) . replace ci_high = res_noan[1,3] in 2 (1 real change made) . replace p_value = res_noan[1,4] in 2 (1 real change made) . replace k = res_noan[1,5] in 2 (1 real change made) . replace tau2 = res_noan[1,6] in 2 (1 real change made) . replace i2 = res_noan[1,7] in 2 (1 real change made) . replace q_stat = res_noan[1,8] in 2 (1 real change made) . . replace analysis_id = "TA_EXCL_ZHANG" in 3 variable analysis_id was str10 now str13 (1 real change made) . replace stratum = "Sensitivity: Exclude Converted (Zhang 2023)" in 3 variable stratum was str38 now str43 (1 real change made) . replace estimate = res_noconv[1,1] in 3 (1 real change made) . replace ci_low = res_noconv[1,2] in 3 (1 real change made) . replace ci_high = res_noconv[1,3] in 3 (1 real change made) . replace p_value = res_noconv[1,4] in 3 (1 real change made) . replace k = res_noconv[1,5] in 3 (1 real change made) . replace tau2 = res_noconv[1,6] in 3 (1 real change made) . replace i2 = res_noconv[1,7] in 3 (1 real change made) . replace q_stat = res_noconv[1,8] in 3 (1 real change made) . . replace analysis_id = "TA_INCL_XIE" in 4 (1 real change made) . replace stratum = "Sensitivity: Broader Window (Include Xie 2014)" in 4 variable stratum was str43 now str46 (1 real change made) . replace estimate = res_broader[1,1] in 4 (1 real change made) . replace ci_low = res_broader[1,2] in 4 (1 real change made) . replace ci_high = res_broader[1,3] in 4 (1 real change made) . replace p_value = res_broader[1,4] in 4 (1 real change made) . replace k = res_broader[1,5] in 4 (1 real change made) . replace tau2 = res_broader[1,6] in 4 (1 real change made) . replace i2 = res_broader[1,7] in 4 (1 real change made) . replace q_stat = res_broader[1,8] in 4 (1 real change made) . . save "06_FINAL_ANALYSIS_V26/03_RESULTS/results_targetA_48h.dta", replace file 06_FINAL_ANALYSIS_V26/03_RESULTS/results_targetA_48h.dta saved . export delimited "06_FINAL_ANALYSIS_V26/03_RESULTS/results_targetA_48h.csv", replace file 06_FINAL_ANALYSIS_V26/03_RESULTS/results_targetA_48h.csv saved . list, clean analysis_id outcome > stratum k estimate ci_low ci_high p_value tau2 i2 q_stat > model 1. TA_STRICT 0-48 h Cumulative Postoperative Opioid Strict Target A (Chen, > Zhang, An) 3 -10.26785 -34.83466 14.29897 .2139469 94.56 97.07373 71.07848 RE > ML + Hartung-Knapp 2. TA_EXCL_AN 0-48 h Cumulative Postoperative Opioid Mandatory Sensitivity: Exclu > de An 2014 2 -12.39536 -128.6308 103.84 .4047531 165.0284 98.59272 71.05895 RE > ML + Hartung-Knapp 3. TA_EXCL_ZHANG 0-48 h Cumulative Postoperative Opioid Sensitivity: Exclude Converted (Z > hang 2023) 2 -13.86749 -113.1642 85.42924 .3266978 117.3932 96.10705 25.68746 RE > ML + Hartung-Knapp 4. TA_INCL_XIE 0-48 h Cumulative Postoperative Opioid Sensitivity: Broader Window (Include > Xie 2014) 4 -12.30189 -26.7354 2.131619 .0730135 79.15422 96.45513 101.8267 RE > ML + Hartung-Knapp . . di as txt _n "SUCCESS: Target A analyses completed and exported." SUCCESS: Target A analyses completed and exported. . log close name: log: /Users/ryan/Documents/Perioperative_TEAS_EA_Review_2026/06_FINAL_ANALYSIS_V26/02_STATA/ > logs/02_targetA_48h.log log type: text closed on: 8 Sep 2026, 08:50:25 ----------------------------------------------------------------------------------------------------