Stata 11 help for cumul

help cumul dialog: cumul -------------------------------------------------------------------------------

Title

[R] cumul -- Cumulative distribution

Syntax

cumul varname [if] [in] [weight] , generate(newvar) [options]

options description ------------------------------------------------------------------------- Main * generate(newvar) create variable newvar freq use frequency units for cumulative equal generate equal cumulatives for tied values ------------------------------------------------------------------------- * generate(newvar) is required. by is allowed; see [D] by. fweights and aweights are allowed; see weight.

Menu

Statistics > Summaries, tables, and tests > Distributional plots and tests > Cumulative distribution graph

Description

cumul creates newvar, defined as the empirical cumulative distribution function of varname.

Options

+------+ ----+ Main +-------------------------------------------------------------

generate(newvar) is required. It specifies the name of the new variable to be created.

freq specifies that the cumulative be in frequency units; otherwise, it is normalized so that newvar is 1 for the largest value of varname.

equal requests that observations with equal values in varname get the same cumulative value in newvar.

Examples

To graph cumulative distribution:

. webuse hsng . cumul faminc, gen(cum) . line cum faminc, sort

To graph two cumulative distributions on the same graph:

. sysuse citytemp, clear . cumul tempjan, gen(cjan) . cumul tempjuly, gen(cjuly) . stack cjan tempjan cjuly tempjuly, into(c temp) wide clear . line cjan cjuly temp, sort

Also see

Manual: [R] cumul

Help: [R] diagnostic plots, [R] kdensity, [D] stack


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index