Multiple median-spline plots
msplot yvarlist xvar [if exp] [in range] [ , clcolor(colorstyle) clpattern(linepatternstyle) clstyle(linestyle) clwidth( linewidthstyle) mspline_options plot(plot) graph_options ]
msplot plots yvarlist versus xvar such that each variable in yvarlist is shown by a median spline as implemented in twoway mspline. That is, apart from some intelligence to improve legend and axis titles, msplot y1 y2 y3 x is a convenience command in place of twoway mspline y1 x || mspline y2 x || mspline y3 x.
Options The connect options clcolor(), clpattern(), clstyle() and clwidth() specify how the median splines are to be shown. Multiple arguments are taken in turn to apply to successive variables in yvarlist, and each option understands the syntax of stylelists.
mspline_options are the bands() and n() options of twoway mspline.
plot(plot) provides a way to add other plots to the generated graph; see help plot option.
graph_options are other appropriate options of twoway.
. msplot mpg weight, plot(scatter mpg weight)
. separate mpg, by(foreign) shortlabel . msplot mpg? weight, clcolor(red blue) clp(solid dash) plot(scatter mpg? weight, ms(Oh Dh) mcolor(red blue))
Nicholas J. Cox, University of Durham, U.K. firstname.lastname@example.org
On-line: help for lowess