------------------------------------------------------------------------------- help fordistplot7-------------------------------------------------------------------------------

Distribution function plotsdistplot7varname[weight] [ifexp] [inrange] [,survgraph_optionsby(byvar)freqgenerate(newvar)monomissing]

distplot7varlist[weight] [ifexp] [inrange] [,survgraph_optionsfreqmono]

Description

distplot7produces a plot of the cumulative distribution function(s) for the variables invarlist. This shows the proportion (or if desired the frequency) of values less than or equal to each value.With the

survoption,distplot7produces a plot of the survival (a.k.a. survivor, reliability, complementary or reverse distribution) function for eachvarname. This shows the proportion (or if desired the frequency) of values greater than each value, that is, the complement of the cumulative distribution function.fweights and aweights are allowed.

distplot7is a renamed clone ofdistplot1.6.1 which is for Stata 7. Stata 8 users should usedistplot2.0.0 or later.

Options

survspecifies calculation and graphing of the survival function rather than the distribution function.

graph_optionsare options allowed withgraph, twoway.Note that with

by()each function is treated graphically as if it were a separate variable, so long as the number of groups is not greater than the limit in Stata on the number ofyvariables on a scatter plot (20 in Stata 7.0).With more groups, all functions must be treated graphically as a single variable, by using the

monooption, which enforces a monochrome treatment. The onlyconnect()line style appropriate is thenc(L), and only onepen()and pointsymbol()may be used.If

ylogis specified, zero values of the survival function are automatically suppressed.

by(byvar)specifies that calculations are to be carried out separately for each class defined bybyvar. Any graph will, however, show the functions for all classes. For a graph with separate panels for each class, use thegenerate()option and thengraphnewvar varname,by(byvar).by()is only allowed with a singlevarname.

freqspecifies calculation of frequency rather than probability.

generate(newvar)specifies a new variable in which the function will be stored.generate()is only allowed with a singlevarname.

monospecifies a monochrome treatment, with a singlepen()colour,connect()style and pointsymbol(). See above, undergraph_options.

missing, used only withby(), permits the use of non-missing values of varname corresponding to missing values for the variable named byby(). The default is to ignore such values.

Examples

. distplot7 mpg

. distplot7 mpg, by(foreign) c(ll)

. distplot7 mpg, by(foreign) c(JJ) surv

. distplot7 length width height

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

AcknowledgmentsElizabeth Allred made helpful comments during program development. Roger Harbord identified a limitation and pointed to a way to resolve it.

Also seeOn-line: help for graph, cumul, quantile, quantil2 (if installed) Manual: [R] graph, [R] cumul, [R] diagplots