*! ml_plot.sthlp metaLong for Stata 14.1

ml_plot — Combined Publication-Ready Longitudinal Meta-Analysis Figures

Syntax

ml_plot ,
metafile(filename)
[sensfile(filename)
splinefile(filename)
fragfile(filename)
alpha()
delta()
title()
scheme()
saving()
replace]

Description

ml_plot assembles a combined multi-panel figure from the results of the
metaLong pipeline. Only metafile() is required; each additional
file adds a panel to the figure.

Panel 1 — Pooled effect trajectory (always drawn):
Plots theta(t) with a shaded confidence ribbon. Significant time points are
marked with a distinct symbol; a dashed line marks the null (theta = 0).

Panel 2 — Sensitivity profile (sensfile() required):
Plots ITCV_adj(t) against the fragility threshold delta. Fragile time points
are shown in red.

Panel 3 — Spline smooth (splinefile() required):
Overlays the RCS spline prediction with confidence band on the observed
pooled estimates with error bars.

Panel 4 — Fragility index (fragfile() required):
Bar chart of the leave-k-out fragility index by time point.

Required option

metafile(filename) specifies the path to the results dataset
saved by ml_meta. This is always required.

Optional panel options

sensfile(filename) adds Panel 2. Specify the path to the
dataset saved by ml_sens.

splinefile(filename) adds Panel 3. Specify the path to the
prediction dataset saved by ml_spline.

fragfile(filename) adds Panel 4. Specify the path to the
dataset saved by ml_fragility.

Appearance options

alpha() sets the significance level for CI ribbon (Panel 1).
Default is 0.05.

delta() sets the fragility threshold reference line in the
sensitivity panel. Default is 0.15.

title() sets an overall title above all panels.

scheme() specifies the Stata graph scheme. Default is
s2color. Other common choices: s1mono, lean2, 538.

saving() saves the combined graph to filename.gph.

replace allows overwriting an existing saving() file.

Example — full pipeline

. sim_longmeta, k(20) times(0 6 12 24) seed(42) clear

. ml_meta yi vi, study(study) time(time) saving(meta_res) replace

. ml_sens yi vi, study(study) time(time) ///

metafile(meta_res) saving(sens_res) replace

. ml_fragility yi vi, study(study) time(time) ///

metafile(meta_res) maxk(3) saving(frag_res) replace

. ml_spline, metafile(meta_res) df(3) saving(spline_res) replace

. ml_plot, metafile(meta_res) sensfile(sens_res) ///

splinefile(spline_res) fragfile(frag_res) ///

title("Longitudinal Meta-Analysis") ///

saving(combined_figure.gph) replace

Notes

The combined graph is produced using Stata's graph combine. Individual
named graphs (panel1, panel2, etc.) are automatically dropped after combining.
To export to PDF or PNG, use graph export after ml_plot.

. ml_plot, metafile(meta_res) sensfile(sens_res)

. graph export combined.pdf, replace

See also

ml_meta, ml_sens, ml_spline, ml_fragility,
graph combine, metalong