-------------------------------------------------------------------------------
help for qdagum, pdagum, qgb2, pgb2, qlogn, plogn, qsm, psm
-------------------------------------------------------------------------------

Distributional diagnostic plots for Dagum, generalized beta (second kind), logn > ormal and Singh-Maddala distributions

qdagum varname [if exp] [in range] [weight] [, param(# # #) generate(newvar) common_options ]

pdagum varname [if exp] [in range] [weight] [, param(# # #) generate(newvar1 newvar2) common_options ]

qgb2 varname [if exp] [in range] [weight] [, param(# # # #) generate(newvar) common_options ]

pgb2 varname [if exp] [in range] [weight] [, param(# # # #) generate(newvar1 newvar2) common_options ]

qlogn varname [if exp] [in range] [weight] [, param(# #) generate(newvar) common_options ]

plogn varname [if exp] [in range] [weight] [, param(# #) generate(newvar1 newvar2) common_options ]

qsm varname [if exp] [in range] [weight] [, param(# # #) generate(newvar) common_options ]

psm varname [if exp] [in range] [weight] [, param(# # #) generate(newvar1 newvar2) common_options ]

where common_options are

a(#) grid show(condition) rlopts(cline_options) plot(plot) scatter_options twoway_options

pweights, fweights, aweights and iweights are allowed; see help weights.

Description

qdagum plots the quantiles of varname against the quantiles of a three-parameter Dagum distribution. The parameters a, b and p are taken by default from e(ba), e(bb) and e(bp), which is where dagumfit puts maximum likelihood estimates of them.

pdagum produces a probability plot for varname compared with a three-parameter Dagum distribution. The parameters a, b and p are taken by default from e(ba), e(bb) and e(bp), which is where dagumfit puts maximum likelihood estimates of them.

qgb2 plots the quantiles of varname against the quantiles of a generalized beta (second kind) distribution. The parameters a, b, p and q are taken by default from e(ba), e(bb), e(bp) and e(bq), which is where gb2fit puts maximum likelihood estimates of them.

pgb2 produces a probability plot for varname compared with a generalized beta (second kind) distribution. The parameters a, b, p and q are taken by default from e(ba), e(bb), e(bp) and e(bq), which is where gb2fit puts maximum likelihood estimates of them.

qlogn plots the quantiles of varname against the quantiles of a two-parameter lognormal distribution. The parameters m and v are taken by default from e(bm) and e(bv), which is where lognfit puts maximum likelihood estimates of them.

plogn produces a probability plot for varname compared with a two-parameter lognormal distribution. The parameters m and v are taken by default from e(bm) and e(bv), which is where lognfit puts maximum likelihood estimates of them.

qsm plots the quantiles of varname against the quantiles of a three-parameter Singh-Maddala distribution. The parameters a, b and q are taken by default from e(ba), e(bb) and e(bq), which is where smfit puts maximum likelihood estimates of them.

psm produces a probability plot for varname compared with a three-parameter Singh-Maddala distribution. The parameters a, b and q are taken by default from e(ba), e(bb) and e(bq), which is where smfit puts maximum likelihood estimates of them.

Remarks

In the majority of cases, *dagum or *gb2 or *logn or *sm will be used just after dagumfit, gb2fit, lognfit or smfit respectively. Care should be taken to echo any if or in restrictions and specification of weights used in setting up the estimation problem. However, see also the param() and show() options.

Options

param() may be used to supply parameter values directly for use in comparing observed and fitted values. a, b and p, in the case of a Dagum distribution, or a, b, p and q, in the case of a generalized beta (second kind) distribution, or m and v, in the case of a lognormal distribution, or a, b and q, in the case of a Singh-Maddala distribution, should be provided as separate values in precisely that order. The documentation for dagumfit, gb2fit, lognfit and smfit provides details on parameterisation.

generate() specifies either the name of one new variable or the names of two new variables to hold the data plotted. In the case of the q* commands here, one new variable generated will hold the quantiles of the fitted distribution. In the case of the p* commands here, two new variables generated will hold, first, the distribution function of the specified distribution given parameters and observed values and, second, the empirical cumulative distribution function.

common_options are a(#) grid show(condition) rlopts(cline_options), plot(plot), scatter_options, and twoway_options.

a() specifies a in the formula for plotting position. The plotting positions are (i - a) / (n - 2a + 1) for values ranked smallest to largest and assigned unique ranks i = 1, ..., n. The default is a = 0.5, giving (i - 0.5) / n. Other choices include a = 0, giving i / (n + 1), and a = 1/3, giving (i - 1/3) / (n + 1/3).

grid adds grid lines at the .05, .10, .25, .50, .75, .90, and .95 quantiles when specified with any q* command here. grid is equivalent to yla(0(.25)1, grid) xla(0(.25)1, grid) when specified with any p* command here.

show() may be used to specify that you wish to restrict the graph according to some condition, say looking at one tail of the distribution only. Note that if and in should not be used for this purpose.

rlopts(cline_options) affect the rendition of the reference line; see help cline_options.

plot(plot) provides a way to add other plots to the generated graph; see help plot_option.

scatter_options affect the rendition of the plotted points; see help scatter.

twoway_options are any of the options documented in help twoway_options excluding by(). These include options for titling the graph (see help title_options) and options for saving the graph to disk (see help saving_option).

Examples

. dagumfit income

. qdagum income

. qdagum income, show(income < 20000)

. pdagum income

. qlogn mpg, param(3 .25)

Author

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

Also see