*! version 1.0.0 \ Daniel Krähmer \ 04 November 2025

Title

mvplot -- Plotting results from multiverse analysis

Syntax

mvplot [if] [in],
coef(varname)
decisions(varlist)
iregression(string)
[options]

* coef(varname) coefficient estimates from the multiverse

* decisions(varlist) decision variables defining the multiverse

* iregression(string) influence regression method (ols|wls)

(*) se(varname) standard errors of coefficient estimates

bins(integer) number of bins to segment the multiverse distribution; default is bins(20)

sig(varname) indicator for statistical significance (0/1)

rowgap(#) vertical space per row in bottom panel; default is rowgap(0.1)

pangap(#) vertical space between panels; default is cmd:pangap(0)

iregnostar suppress significance stars in influence regression

iregnose suppress standard errors in influence regression

kdline(connect_options) kdensity line options

kdarea(area_options) kdensity area options

kdnpoints(#) kdensity estimation points; see option n(#) in kdensity

kdkernel(kernel) kdensity kernel function

twoway_options twoway options, other than by()

* coef(), decisions(), and iregression() are required. se() is required when iregression(wls) is specified.

Description

mvplot visualizes results from multiverse analysis.

The command produces a plot with two panels: an upper panel displaying the multiverse distribution of the target coefficient as a density function,
and a lower panel showing the multiverse's analytical composition alongside results from an influence regression quantifying the impact of each researcher decision on the target coefficient.

Note that mvplot itself does not conduct multiverse analyses. Instead, it requires users to provide a results dataset from an already completed multiverse analysis. Hence,
the command is best used in conjunction with the multivrs command (Young & Holsteen, 2021).

Options

Main

coef(varname) specifies the variable containing the target coefficient (the estimand) estimated repeatedly across the multiverse analysis.

decisions(varlist) specifies a list of researcher decisions underlying the multiverse. Variable values should capture analytical options.
Variables must be numeric and should be labeled, as variable labels and value labels will appear in the final graph.

iregression(string) determines the type of regression model for calculating influence statistics. Options are ols or wls. Results from the influence regression are stored in e().
Note: If iregression(wls) is used, users must also specify option se().

Optional

se(varname) specifies the variable containing standard errors for the coefficient estimates. This option is required when iregression(wls) is specified.

bins(integer) specifies the number of bins for segmenting the multiverse distribution in the lower panel. If bins(integer) is set to the number of possible model specifications in the multiverse,
mvplot will produce a specification curve (see Simonsohn et al. 2020). The default value is bins(20).

sig(varname) specifies an indicator variable (0/1) capturing whether a multiverse specification's target coefficient was statistically significant.
You may chose your preferred alpha threshold when generating this variable.

rowgap(#) determines the vertical space allocated to each row in the bottom panel, measured in units of the top density panel. Use this option to adjust the relative size of the bottom panel
compared to the top panel. Increasing rowgap() will allocate more space to the bottom panel. A reasonable default is determined automatically.

pangap(#) specifies extra vertical space between the two panels, measured in units of the density panel. Use this option to visually separate the two panels more clearly. The default is pangap(0).

iregnostar suppresses the display of significance stars in the influence regression output. By default, stars are shown with *** p<0.001, ** p<0.01, * p<0.05.

iregnose suppresses the display of standard errors in the influence regression output. By default, standard errors are shown in parentheses.

kdline(connect_options) modifies the appearance of the line plot in the upper panel.

kdarea(area_options) modifies the appearance of the area plot in the upper panel.

kdnpoints(#) determines the number of points for estimating the density function; see n(#) in kdensity.

kdkernel(kernel) allows you to switch between different kernel functions for estimating the density.

Twoway options

twoway_options are general options for twoway graphs, excluding by(). Because of how mvplot operates internally, users should note the following:

Y-axis labels: labels for the density plot (top panel, left side) can be customized using regular ylabel() syntax; y-axis labels for researcher decisions (bottom panel, left side)
should be customized using ylabel(..., axis(1)); y-axis labels for influence estimates (bottom panel, right side) should be customized using ylabel(..., axis(2)).

Legend: By default, mvplot produces no legend. Users may add a legend, but should keep in mind that multiverse plots contain a large number of rbar plots in the bottom panel which will clutter the legend.
Hence, if a legend is added, it is recommended to display only the first and second twoway plot, using legend(order(1 "..." 2 "...")).

Stored results

mvplot stores the influence regression results in e(), following standard regress output conventions.

Examples

Install the multivrs ado to conduct a multiverse analysis:

. ssc install multivrs

Load demo data:

. sysuse nlsw88, clear

Run a multiverse analysis and save the results:

. cap erase mva_results.dta
. cap erase mva_results.do
. qui multivrs regress union hours age grade collgrad married south smsa c_city ttl_exp tenure, saveas(mva_results) noplot

Load results:

. use mva_results, clear

Plot:

. mvplot, coef(b_intvar) dec(r_*) ireg(ols) name(g1, replace)

Note: While the graph g1 already shows the distribution of multiverse estimates (top panel) and patterns in analytical decisions (bottom panel),
it has poor labels and suboptimal scaling. We can easily address these problems by modifying the underlying data:

. generate b_intvar_resc = 1000 * b_intvar
. lab var r_age "Age"
. lab var r_grade "Grade completed"
. lab var r_collgrad "Collage graduate"
. lab var r_married "Married"
. lab var r_south "Region"
. lab var r_smsa "SMSA"
. lab var r_c_city "Central city"
. lab var r_ttl_exp "Work Experience"
. lab var r_tenure "Job tenure"
. lab define r_lbl 0 "Excluded" 1 "Included"
. lab val r_* r_lbl

Plot (with added twoway_options):

. local twopt1 ylab(0(0.5)1) yline(0, lcolor(black)) ytitle(, margin(t=3 r=-5)) graphregion(margin(l=15) color(white))
. local twopt2 title("Effect of union membership on working hours (varying controls)", size(medium) margin(bottom))
. mvplot, coef(b_intvar_resc) dec(r_*) bins(20) ireg(ols) rowgap(0.1) `twopt1' `twopt2' name(g2, replace)

Author

Daniel Krähmer (LMU Munich) and Cristobal Young (Cornell University)

Contact: daniel.kraehmer@soziologie.uni-muenchen.de

References

Young, C. & Holsteen, K. 2021. "MULTIVRS: Stata module to conduct multiverse analysis," Statistical Software Components S458927, Boston College Department of Economics, revised 15 Apr 2021.

Simonsohn, U., Simmons, J.P. & Nelson, L.D. 2020. "Specification curve analysis," Nat Hum Behav 4, 1208–1214 (2020). https://doi.org/10.1038/s41562-020-0912-z