*! 1.0 17Oct2012
help ldtest

Title

ldtest -- Consistent Nonparametric Tests of Lorenz Dominance with individual level data: Independent Random Sampling

Syntax

ldtest
varnameX weightX
varnameY weightY
[if] [in]
[,
breps(bootreps) cvm lce
]

Description

ldtest command applies the tests of Lorenz Dominance presented
in Barrett, Donald and Bhattacharya (2013).

The tests are for the null hypothesis that distribution X Lorenz Dominates distribution Y.

More formally, the test is for

H0: LC_x(p) >= LC_y(p) for all p, and

H1: LC_x(p) < LC_y(p) for some p.

where p, the abscissa, is the set of empirical population quantiles

In terms of the command syntax, varnameX is the name of the X-variable, weightX is the name of the weight
variable for varnameX, varnameY is the name of the Y-variable and weightY is the corresponding weight for
varnameY. The null hypothesis is that the X-variable weakly Lorenz Dominates the Y-variable.

Two test statistics for the null of Lorenz dominance are constructed, and the corresponding p-values computed.

(i) Kolmogorov-Smirnov type test statistic based on the largest positive difference LC_(y)-LC_(x). This is
the default test statistic.

(ii) Cramer von Mises test statistic based on the integral of the postive difference of LC_(y)-LC_(x).

In addition,

(iii)the test statistic for the null of Lorenz curve equality, LC_x(p)=LC_y(p) for all p, based on the standard two-sample KS test,
is available as an option.

The empirical bootstrap is used to simulate the distribution of each test statistic and thereby calculate the
corresponding p-values. Intuitively, the test statistics are a (normalised) measure of the distance by
which is the null is violated. The ldtest command reports the test statistic, p-value and the 'distance'
measure underlying the test statistic.

Options

breps(bootreps) specifies the number of bootstrap repetitions to be used in simulating the p-value for the tests.
The default is bootreps=10.

cvm specifies that the Cramer-von Mises test statistic be used.

lce specifies that the KS test of Lorenz Curve equality be used.

Examples

Setup unweighted data

. gen wgh10=1 if income10~=.

. gen wgh11=1 if income11~=.

. ldtest income10 wgh10 income11 wgh11, cvm

. ldtest income10 wgh10 income11 wgh11, lce

. ldtest income10 wgh10 income11 wgh11, breps(500) cvm

Using weighted data

. ldtest inc09 wgh09 inc03 wgh03

. ldtest inc09 wgh09 inc03 wgh03, breps(1000)

. ldtest inc03 wgh03 inc09 wgh09, breps(1000)

. ldtest cons03 wgh03 cons09 wgh09, breps(2000)

. ldtest cons03 wgh03 cons09 wgh09, breps(2000) lce

. ldtest cons03 wgh03 cons09 wgh09, breps(2000) cvm

Saved results

ldtest saves the following in r():

Scalars

r(KS) Kolmogorov-Smirnov (KS) type test statistic

r(CvM) Cramer - von Mises (CvM) or Integrated postive difference test statistic

r(LCe) KS Lorenz Curve Equality test statistic

r(pKS) p-value for the KS test statistic

r(pCvM) p-value for the CvM test statistic

r(pLCe) p-value for the LC equality test statistic

r(dKS) Largest positive difference for the KS test statistic

r(dCvM) Integrated postive difference for the CvM test

r(LCe) Largest absolute difference for the KS LCe test

Notes

ldtest is designed to be used with two independent samples of individual-level,
unit-record data. The data are assumed to be weighted, with record weights corresponding
to the inverse probability of being in the sample. The test procedures, which are based on
the non-parametric estimation of the empirical Lorenz curves, are independent of the scale
of each weight variable (i.e. HOD 0 in the weight variables). If the data are a
simple random sample - equivalently, unweighted - this is easily handled by creating a weighting
variable which is the same constant value (eg weightx=1) for all observations.

If the samples are not independent but are matched-pairs, such as with panel data, then use
the ldtestmp command. The test procedures have been adapted to deal with panel dependence,
as explained in the cited reference. The empirical bootstrap procedure is modified for that
command to resample paired X-Y observations for a given observational unit, thereby replicating the dependence
structure.

ldtest is a based on two independent samples. Typically the data set will
be individual records from two independent surveys appended together. The structure of the data
is such that for the set of 2009 records the values of the 2003 income and weight variables
are missing, and vice versa. For example, I want to test whether the 2009 distribution of individual
income Lorenz dominates the 2003 distribution of income. I have a sample of individual records drawn
from surveys in 2003 and 2009 which have been appended (stacked vertically) together. In the data
held in memory, the 2003 observations will have missing values for the 2009 variables, and the 2009
observations will have missing values for the 2003 variables.

ldtest reports the run time in seconds. The run time is approximately linear in
bootreps. It is recommended that ldtest be used with a relatively low value for
bootreps (such as the default bootreps=10) to provide a guide the run time at higher
values. Then re-run ldtest with breps(bootreps) set to the
preferred value and you will have a good idea when the simulation and calculation will be completed.

Authors

Garry Barrett, University of Sydney

garry.barrett@sydney.edu.au

Stephen Donald, University of Texas at Austin

stephen.g.donald@gmail.com

References

Barrett, G.F, S.G. Donald and D. Bhattacharya (2012) "Consistent Nonparametric Tests
for Lorenz Dominance" Journal of Business and Economic Statistics, forthcoming.

Also see

Manual: [R] inequality

Online: ldtestmp for testing with matched-pairs, or panel, data (if installed)