*! version 1.0.0 18Aug2023

Title

mountainplot -- Folded Empirical Distribution Function Curves (Mountain Plots)

Syntax

mountainplot
varlist
[if] [in]
[,
difference
standardize
twoway_options
]

mountainplot

difference generates the mountainplot by computing the difference(s) between the first variable specified in varlist and all others

standardize standardizes values of varlist to have a mean of 0 and standard deviation of 1

twoway_options allows all available options of twoway graphs

Description

mountainplot produces mountain plots for variables in a varlist as proposed by Monti (1995), and
mountain plots for differences between variables in a varlist as proposed by Krouwer and Monti (1995).
A mountainplot is a graphical representation of an empirical cumulative distribution function in which
percentile values above 50 are "folded" (i.e. subtracted from 100 in order to produce a reverse ordering). The resulting
graphic resembles a mountain where the peak is approximately at the median.

Monti (1995) suggests that mountain plots allow the user to perform the following:

1. Determine the median.

2. Determine the range.

3. Determine the central or tail percentiles of any magnitude.

4. Observe outliers.

5. Observe unusual gaps in the data.

6. Examine the data for symmetry.

7. Compare several distributions.

8. Visually gauge the sample size.

Krouwer and Monti (1995) propose creating a mountain plot as a complementary to the Bland and Altman plot (Bland and Altman 1986).
Here, the mountain plot represents the percentile difference between a new test and a reference test (Y-axis).
This percentile difference is then plotted against the difference between the two tests (X-axis).

Options

difference generates the mountain plot by computing the difference(s) between the first variable specified in varlist which should
represent the reference test (gold standard) and all other variables in the varlist (representing one or more new tests). The default
is to generate the mountain plot for each variable specified in varlist and plot it against that variable's range of values
on its original scale.

standardize transforms the data in varlist to have a mean of 0 and standard deviation of 1. This option is
particularly appropriate when more than one variable is being plotted and the variables are on different scales.

twoway_options allows all available options for twoway graphs.

Examples

Setup

. use lungfunction.dta

Produce a mountain plot for the first of four measurements of lung function in each of 20 schoolchildren (data are from Bland & Altman [1996])

. mountainplot rating1

Now plot all four measurements of lung function

. mountainplot rating1 - rating4

Same as above but used standardized values for the specified variables

. mountainplot rating1 - rating4, stand

Produce a mountain plot of the difference between rating1 (reference test) and rating2 (a new test)

. mountainplot rating1 rating2, difference

Same as above, but plot the difference between rating1 (reference test) and all other ratings (new tests)

. mountainplot rating1 - rating4, difference

References

Bland, J. M., and D. G. Altman. 1986. Statistical method for assessing agreement between two methods of clinical measurement.
Lancet 327: 307-310.

Bland, J. M., and D. G. Altman. 1996. Statistics notes: measurement error.
British Medical Journal 312: 1654.

Krouwer, J. S. and K. L. Monti 1995. A simple, graphical method to evaluate laboratory assays.
European Journal of Clinical Chemistry and Clinical Biochemistry 33: 525-527.

Monti, K. L. 1995. Folded empirical distribution function curves-mountain plots.
The American Statistician 49: 342–345.

Citation of mountainplot

mountainplot is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden A. (2023). MOUNTAINPLOT: Stata module to produce folded empirical distribution function curves (mountain plots)

Authors

Ariel Linden

President, Linden Consulting Group, LLC

alinden@lindenconsulting.org

Also see

Online: cumul, mountain (if installed)