------------------------------------------------------------------------------- help forqdagum,pdagum,qgb2,pgb2,qlogn,plogn,qsm,psm-------------------------------------------------------------------------------

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

qdagumvarname[ifexp] [inrange] [weight] [,param(# # #)generate(newvar)common_options]

pdagumvarname[ifexp] [inrange] [weight] [,param(# # #)generate(newvar1 newvar2)common_options]

qgb2varname[ifexp] [inrange] [weight] [,param(# # # #)generate(newvar)common_options]

pgb2varname[ifexp] [inrange] [weight] [,param(# # # #)generate(newvar1 newvar2)common_options]

qlognvarname[ifexp] [inrange] [weight] [,param(# #)generate(newvar)common_options]

plognvarname[ifexp] [inrange] [weight] [,param(# #)generate(newvar1 newvar2)common_options]

qsmvarname[ifexp] [inrange] [weight] [,param(# # #)generate(newvar)common_options]

psmvarname[ifexp] [inrange] [weight] [,param(# # #)generate(newvar1 newvar2)common_options]where

common_optionsare

a(#)gridshow(condition)rlopts(cline_options)plot(plot)scatter_optionstwoway_options

pweights,fweights,aweights andiweights are allowed; see help weights.

Description

qdagumplots the quantiles ofvarnameagainst the quantiles of a three-parameter Dagum distribution. The parametersa,bandpare taken by default frome(ba),e(bb)ande(bp), which is where dagumfit puts maximum likelihood estimates of them.

pdagumproduces a probability plot forvarnamecompared with a three-parameter Dagum distribution. The parametersa,bandpare taken by default frome(ba),e(bb)ande(bp), which is where dagumfit puts maximum likelihood estimates of them.

qgb2plots the quantiles ofvarnameagainst the quantiles of a generalized beta (second kind) distribution. The parametersa,b,pandqare taken by default frome(ba),e(bb),e(bp)ande(bq), which is where gb2fit puts maximum likelihood estimates of them.

pgb2produces a probability plot forvarnamecompared with a generalized beta (second kind) distribution. The parametersa,b,pandqare taken by default frome(ba),e(bb),e(bp)ande(bq), which is where gb2fit puts maximum likelihood estimates of them.

qlognplots the quantiles ofvarnameagainst the quantiles of a two-parameter lognormal distribution. The parametersmandvare taken by default frome(bm)ande(bv), which is where lognfit puts maximum likelihood estimates of them.

plognproduces a probability plot forvarnamecompared with a two-parameter lognormal distribution. The parametersmandvare taken by default frome(bm)ande(bv), which is where lognfit puts maximum likelihood estimates of them.

qsmplots the quantiles ofvarnameagainst the quantiles of a three-parameter Singh-Maddala distribution. The parametersa,bandqare taken by default frome(ba),e(bb)ande(bq), which is where smfit puts maximum likelihood estimates of them.

psmproduces a probability plot forvarnamecompared with a three-parameter Singh-Maddala distribution. The parametersa,bandqare taken by default frome(ba),e(bb)ande(bq), which is where smfit puts maximum likelihood estimates of them.

RemarksIn the majority of cases, *

dagumor *gb2or *lognor *smwill be used just afterdagumfit,gb2fit,lognfitorsmfitrespectively. Care should be taken to echo anyiforinrestrictions and specification of weights used in setting up the estimation problem. However, see also theparam()andshow()options.

Options

param()may be used to supply parameter values directly for use in comparing observed and fitted values.a,bandp, in the case of a Dagum distribution, ora,b,pandq, in the case of a generalized beta (second kind) distribution, ormandv, in the case of a lognormal distribution, ora,bandq, 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 theq* commands here, one new variable generated will hold the quantiles of the fitted distribution. In the case of thep* 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_optionsarea(#)gridshow(condition)rlopts(cline_options),plot(plot),scatter_options, andtwoway_options.

a()specifiesain the formula for plotting position. The plotting positions are (i-a) / (n- 2a+ 1) for values ranked smallest to largest and assigned unique ranksi= 1, ...,n. The default isa= 0.5, giving (i- 0.5) /n. Other choices includea= 0, givingi/ (n+ 1), anda= 1/3, giving (i- 1/3) / (n+ 1/3).

gridadds grid lines at the .05, .10, .25, .50, .75, .90, and .95 quantiles when specified with anyq* command here.gridis equivalent toyla(0(.25)1, grid) xla(0(.25)1, grid)when specified with anyp* 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 thatifandinshould 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_optionsaffect the rendition of the plotted points; see help scatter.

twoway_optionsare any of the options documented in help twoway_options excludingby(). 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)

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

Also see