*! madot version 1.0 01Sep2021
help madot

Title

madot -- Dot plot for summary data (pooled estimates) from meta-analysis for multiple outocmes in systematic reviews.

Syntax

madot, outcome(varname) dot1(varname) dot2(varname) poolest(varname) n(varname) cil(varname) ciu(varname) textcol1(varname) textcol2(varname) textcol3(varname) textcol4(varname) textcol5(varname) textcol6(varname) [options]

* outcome(varname) variable indicating outcomes in the dataset

* dot1(varname) variable to plot as a dot; e.g. proportion of event out of total sample size in treatment grp, or weighted mean of treatment group at baseline (must be numeric)

* dot2(varname) variable to plot as a dot; e.g. proportion of event out of total sample size in control grp, or weighted mean of control group at baseline (must be numeric)

* poolest(varname) pooled estimates from meta-analysis (MA), e.g. relative risks from MA for dichotomous outcomes, or mean differences from MA for continuous outcomes (must be numeric)

* n(varname) order of outcomes or other variable for sorting

* cil(varname) lower bound of 95% CI of pooled estimates (must be numeric)

* ciu(varname) upper bound of 95% CI of pooled estimates (must be numeric)

* textcol1(varname) variable to show in the 1st text column

* textcol2(varname) variable to show in the 2nd text column

* textcol3(varname) variable to show in the 3rd text column

* textcol4(varname) variable to show in the 4th text column

* textcol5(varname) variable to show in the 5th text column

* textcol6(varname) variable to show in the 6th text column

clear if specified the newly created dataset is stored in memory. Without clear the original dataset is retained in memory

logoff(#) specify whether using log-scale for x axis in right scatter plot - default is logoff(0) using log-scale for dichotomous outcomes

leftxtitle(string) title for x axis (reversed y axis) of left dot plot - the default is "Proportion" for dichotomous outcomes or "Weighted baseline means" for continuous outcomes

rightxtitle(string) title for x axis of right scatter plot

leftcolor1(colorstyle) color of dot fill and outline on left dot plot for 1st group - default is leftcolor1(red)

leftcolsat1(#) marker color saturation of 1st group for left dot plot - default is leftcolsat1(50)

leftsymb1(symbolstyle) marker symbol for first group value on left dot plot symbol - default is leftsymb1(triangle)

leftcolor2((colorstyle) color of dot fill and outline on left dot plot for 2nd group - default is leftcolor2(blue)

leftcolsat2(#) marker color saturation of 2nd group for left for dot plot - default is leftcolsat2(50)

leftsymb2(symbolstyle) marker symbol for second group value on left dot plot symbol - default is leftsymb2(circle)

rightxlinepat(string) style of vertical line on right scatter plot - default is dash

rightxlinecolor(colorstyle) color of vertical line on right scatter plot - default is rightxlinecolor(bluishgray)

rightxlabel(numlist) specify x axis tick labels on right scatter plot - default is 0.5 1 2 900

legendleftyn(#) indicates whether legend turned on for left dot plot - default is 1 for legend on

legendleft1(string) legend of first group on left dot plot - default is "Treatment"

legendleft2(string) legend of second group on left dot plot - default is "Control"

legendleftpos(#) position of legend on on left dot plot - default is legendleftpos(6)

legendleftcol(#) number of columns of legend in left dot plot - default is legendleftcol(2)

legendleftrow(#) number of rows of legend in left dot plot - default is legendleftrow(1)

legendrightyn(#) indicates whether legend turned on for right scatter plot - default is 1 for legend on

legendright1(string) text of the legend in right scatterplot - default is "RR from MA" for dichotomous outcomes or "MD" for continuous outcomes

legendright2(string) text of the legend in right scatter plot - default is "95% CI"

legendrightpos(#) position of legend in right scatter plot- default is legendrightpos(6)

legendrightcol(#) number of columns of legend in right scatter plot - default is legendrightcol(2)

legendrightrow(#) number of columns of legend in right scatter plot - default is legendrightrow(1)

textcol1pos(#) x axis position to place the 1st text column

textcol2pos(#) x axis position to place the 2nd text column

textcol3pos(#) x axis position to place the 3rd text column

textcol4pos(#) x axis position to place the 4th text column

textcol5pos(#) x axis position to place the 5th text column

textcol6pos(#) x axis position to place the 6th text column

textcolposy(#) y axis position to place the labels of text columns - default is textcolposy(0.1)

textcol1name(string) label for the 1st text column - default is "RR (95% CI)" for dichotomous outcomes or "MD (95% CI)" for continuous outcomes

textcol2name(string) label for the 2nd text column - default is "Trt n/N" for dichotomous outcomes or "Trt BL mean" for continuous outcomes

textcol3name(string) label for the 3rd text column - default is "ctrl n/N" for dichotomous outcomes or "Ctrl BL mean" for continuous outcomes

textcol4name(string) label for the 4th text column - default is "NTials", meaning number of trials

textcol5name(string) label for the 5th text column - default is "I-squared"

textcol6name(string) label for the 6th text column - default is "SOE"

grphcol(colorstyle) graph background color - default is grphcol(white)

plotcol(colorstyle) plot background color - default is plotcol(white)

title(string) title for the overall graph

subtitle(string) subtitle for the overall graph

graphwidth(#) width of overall graph - default is graphwidth(10)

graphheight(#) height of overall graph - default isgraphheight(5)

iscale(#) adjust size of text and markers - default isiscale(0.55)

margin(#) set the percentage increase of space to be added when nummargin(1) - default is margin(0). See marginstyle for further details.

* outcome, dot1, dot2, poolest, n, cil, ciu, textcol1, textcol2, textcol3, textcol4, textcol5, and textcol6 are required.

Description

madot creates a figure to summarize pooled estimates from meta-analysis for multiple outcomes in systematic reviews. This figure presents two plots adjacent to each other. For dichotomous outcomes, the figure shows for each outcome the pooled absolute rate of events in each treatment arm in the left dot plot, as well as the pooled relative risk and 95% confidence interval in right scatter plot. The figure also includes 6 columns that display relative risk and 95% confidence interval, the total number of events and total sample size for each treatment group, the number of trials, the heterogeneity statistic (I-square), and the strength of evidence grade. For continuous outcomes, the left dot plot shows for each outcome the baseline pooled weighted mean in both treatment groups and the right scatter plot shows the pooled mean difference and 95% confidence interval, as well as the baseline pooled weighted means of both groups, number of trials, I-square, and strength of evidence grade. The content to be included in the 6 text columns can be customized.

Options

Required options

outcome(varname) variable indicating outcomes in the dataset

dot1(varname) variable to plot as dot; e.g. proportion of event out of total sample size in treatment group, or weighted mean of treatment group at baseline (must be numeric)

dot2(varname) variable to plot as dot; e.g. proportion of event out of total sample size in control group, or weighted mean of control group at baseline (must be numeric)

poolest(varname) pooled estimates from meta-analysis, e.g. relative risks from MA for dichotomous outcomes, or mean differences from MA for continuous outcomes (must be numeric)

n(varname) order of outcomes or other variable for sorting

cil(varname) lower bound of 95% CI of pooled estimates (must be numeric)

ciu(varname) upper bound of 95% CI of pooled estimates (must be numeric)

textcol1(varname) variable to show in the 1st text column

textcol2(varname) variable to show in the 2nd text column

textcol3(varname) variable to show in the 3rd text column

textcol4(varname) variable to show in the 4th text column

textcol5(varname) variable to show in the 5th text column

textcol6(varname) variable to show in the 6th text column

Left plot options

leftxtitle(string) title for x axis (reversed y axis) of left dot plot - the default is "Proportion" for dichotomous outcomes or "Baseline weighted means" for continuous outcomes

leftcolor1(colorstyle) color of dot fill and outline on left dot plot for 1st group, must be one of Stata's colorstyle - default is leftcolor1(red)

leftcolsat1(#)} marker color saturation of 1st group for left dot plot - default is leftcolsat1(50)

leftsymb1(symbolstyle) marker symbol for first group value on left dot plot symbol, must be one of Stata's symbolstyle - default is leftsymb1(triangle)

leftcolor2(colorstyle) color of dot fill and outline on left dot plot for 2nd group, must be one of Stata's colorstyle - default is leftcolor2(blue)

leftcolsat2(#) marker color saturation of 2nd group for left for dot plot - default is leftcolsat2(50)

leftsymb2(symbolstyle) marker symbol for second group value on left dot plot symbol, must be one of Stata's symbolstyle - default is leftsymb2(circle)

legendleftyn(#) indicates whether legend turned on for left dot plot, can only take values 0 or 1 - default is 1 for legend on

legendleft1(string) legend of first group on left dot plot - default is "Treatment"

legendleft2(string) legend of second group on left dot plot - default is "Control"

legendleftpos(#) position of legend on left dot plot, can only take integer values from 1 to 12 - default is legendleftpos(6)

legendleftcol(#) number of columns of legend in left dot plot, can only take integer values - default is legendleftcol(2)

legendleftrow(#) number of rows of legend in left dot plot, can only take integer values - default is legendleftrow(1)

Right plot options

logoff(#) specify whether using logarithmic scale for x axis in right scatter plot, can only take values 0 or 1 - default is logoff(0) using logarithmic scale for x axis in right scatter plot for dichotomous outcomes. logoff(1) is recommended for continuous outcomes to display a linear x axis.

rightxtitle(string) title for x axis of right scatter plot

rightxlinepat(string) style of vertical line on right scatter plot, must be one of Stata's linepattern - default is rightxlinepat(dash)

rightxlinecolor(colorstyle) color of vertical line on right scatter plot, must be one of Stata's colorstyle - default is rightxlinecolor(bluishgray)

rightxlabel(numlist) specify x axis tick labels on right scatter plot - default is rightxlabel(0.5 1 2 900)

legendrightyn(#) indicates whether legend turned on for right scatter plot, can only take values 0 or 1 - default is 1 for legend on

legendright1(string) text of the legend in right scatterplot - default is "RR from MA" for dichotomous outcomes or "MD" for continuous outcomes

legendright2(string) text of the legend in right scatter plot - default is "95% CI"

legendrightpos(#) position of legend in right scatter plot, can only take integer values from 1 to 12 - default is legendrightpos(6)

legendrightcol(#) number of columns of legend in right scatter plot, can only take integer values - default is legendrightcol(2)

legendrightrow(#) number of columns of legend in right scatter plot, can only take integer values - default is legendrightrow(1)

Text column options

textcol1pos(#) x axis position to place the 1st text column - default is textcol1pos(5)

textcol2pos(#) x axis position to place the 2nd text column - default is textcol2pos(18)

textcol3pos(#) x axis position to place the 3rd text column - default is textcol3pos(55)

textcol4pos(#) x axis position to place the 4th text column - default is textcol4pos(120)

textcol5pos(#) x axis position to place the 5th text column - default is textcol5pos(240)

textcol6pos(#) x axis position to place the 6th text column - default is textcol6pos(450)

textcolposy(#) y axis position to place the labels of text columns, adjust this value to align outcomes in left and right plots - default is textcolposy(0.1)

textcol1name(string) label for the 1st text column - default is "RR (95% CI)" for dichotomous outcomes or "MD (95% CI)" for continuous outcomes

textcol2name(string) label for the 2nd text column - default is "Trt n/N" for dichotomous outcomes or "Trt BL mean" for continuous outcomes

textcol3name(string) label for the 3rd text column - default is "ctrl n/N" for dichotomous outcomes or "Ctrl BL mean" for continuous outcomes

textcol4name(string) label for the 4th text column - default is "NTials", meaning number of trials

textcol5name(string) label for the 5th text column - default is "I-squared"

textcol6name(string) label for the 6th text column - default is "SOE", meaning strength of evidence

Overall graph options

clear if specified the newly created dataset is stored in memory. If clear not specified, the original dataset is retained in memory.

grphcol(colorstyle) graph background color, must be one of Stata's colorstyle - default is grphcol(white)

plotcol(colorstyle) plot background color, must be one of Stata's colorstyle - default is plotcol(white)

title(string) title for the overall graph

subtitle(string) subtitle for the overall graph

graphwidth(#) width of overall graph - default is graphwidth(10)

graphheight(#) height of overall graph - default is graphheight(5)

iscale(#) adjust size of text and markers - default is iscale(0.55)

margin(#) set the percentage increase of space to be added - default is margin(0). See marginstyle for further details.

Remarks

(1) Dataset is required in a format of one row per outcome.

(2) Generating a variable for sorting is required. For example: gen order = _n

(3) Logarithmic scale of x-axis using option logoff(0) in the right scatter plot is recommended for displaying pooled relative risk of dichotomous outcomes; while linear scale of x-axis using option logoff(1) is appropriate for displaying pooled mean difference of continuous outcomes in the right scatter plot.

Examples

Creating dot plot for dichotomous outcomes using default settings:

. madot, outcome(Outcome) dot1(prop1) dot2(prop2) poolest(RR) n(order) cil(cil) ciu(ciu) textcol1(sRR) textcol2(trt_n_N) textcol3(ctrl_n_N) textcol4(NoofTrials) textcol5(sIsquared) textcol6(SOE)

Creating dot plot for dichotomous outcomes using customized settings --

using the legendleft1 and textcol2name options to assign treatment group names;

using the rightxlabel option to change ticker markders of right x-axis;

using the textcol1pos to textcol6pos options to adjust positions of text columns:

. madot, outcome(Outcome) dot1(prop1) dot2(prop2) poolest(RR) n(order) cil(cil) ciu(ciu) textcol1(sRR) textcol2(trt_n_N) textcol3(ctrl_n_N) textcol4(NoofTrials) textcol5(sIsquared) textcol6(SOE) legendleft1("TRT group name") textcol2name("TRT group n/N") rightxlabel(0.8 1 2 4 900) textcol1pos(10) textcol2pos(35) textcol3pos(80) textcol4pos(150) textcol5pos(250) textcol6pos(500)

Creating dot plot for continuous outcomes using the logoff(1) option --

using the textcolposy option to adjust height of text columns for better alignment;

using the legendleft1, legendleft2, textcol2name and textcol3name options to assign;

using the rightxlabel option to change ticker markers of right x-axis;

using the textcol1pos to textcol6pos options to adjust positions of text columns:

. madot, outcome(Outcome) dot1(trt_bl_mean) dot2(ctrl_bl_mean) poolest(MD) n(order) cil(cil) ciu(ciu) textcol1(sMD2) textcol2(trt_N) textcol3(ctrl_N) textcol4(NoofTrials) textcol5(sIsquared) textcol6(SOE) logoff(1) textcolposy(0.5) textcol2name("Trt (N)") textcol3name("Ctrl (N)") rightxlabel( -8 -6 -4 -2 0 2 19) textcol1pos(5) textcol2pos(8.7) textcol3pos(11) textcol4pos(13.5) textcol5pos(15) textcol6pos(17) graphheight(3) graphwidth(8.5) iscale(0.8)

Acknowledgments

This module is adopped from the aedots package. We thank Dr. Rachel Phillips and Dr. Suzie Cro (Imperial College London, UK) for their contributions on developing the aedots package.

References

Amit, O. , Heiberger, R. M. and Lane, P. W. 2008. Graphical approaches to the analysis of safety data from clinical trials.
Pharmaceut. Statist. 7: 20-35. doi:10.1002/pst.254

Cornelius, V., Cro, S. & Phillips, R. 2020. Advantages of visualisations to evaluate and communicate adverse event information in randomised controlled trials.
Trials. 21: 1028. doi.org/10.1186/s13063-020-04903-0 PMID: 33353566.

Authors

Yun Yu

Pacific Northwest Evidence-based Practice Center, Portland, OR US

email: yuy@ohsu.edu

Rongwei Fu, Pacific Northwest Evidence-based Practice Center, Portland, OR US

Jesse Wagner, Pacific Northwest Evidence-based Practice Center, Portland, OR US

Azrah Ahmed, Pacific Northwest Evidence-based Practice Center, Portland, OR US

Connor Smith, Pacific Northwest Evidence-based Practice Center, Portland, OR US

Roger Chou, Pacific Northwest Evidence-based Practice Center, Portland, OR US