*! 1.0 17Oct2012
help ldtestmp

Title

ldtestmp -- Consistent Nonparametric Tests of Lorenz Dominance with individual level data: Matched Pair (panel) Sampling

Syntax

ldtestmp
varnameX
varnameY weight
[if] [in]
[,
breps(bootreps) cvm lce
]

Description

ldtestmp command applies the tests of Lorenz Dominance for Matched Pair Sampling schemes presented
in Barrett, Donald and Bhattacharya (2012).

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,varnameY is the name of the Y-variable and
weight is the sampling weight for observation. This procedure assumes the sampling scheme is matched pairs - such as with panel
data - where the values of varnameX and varnameY are recorded for each observational unit.
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 wgh=1 if income10~=.&income11~=.

. ldtestmp income10 income11 wgh, cvm

. ldtestmp income10 income11 wgh, lce

. ldtestmp income10 income11 wgh, breps(500) cvm

Using weighted data

. ldtest inc09 wgh09 inc03 wgh03

. ldtestmp inc09 inc03 wgh, breps(1000)

. ldtestmp inc03 inc09 wgh, breps(1000)

. ldtestmp cons03 cons09 wgh, breps(2000)

. ldtestmp cons03 cons09 wgh, breps(2000) lce

. ldtestmp cons03 cons09 wgh, 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 a matched-pair sample of individual-level,
unit-record data. As explained in the cited reference, this procedure deals with panel dependence.
The empirical bootstrap procedure is modified to resample paired X-Y observations for a given
observational unit, thereby replicating the dependence structure.

Typically the data are drawn from a panel or are clustered. For example, if I have a
panel survey of individuals tracked from 2003 to 2009 where I have income in each year, and a weight variable.
I want to test whether the 2009 distribution of individual income Lorenz dominates the 2003 distribution of income,
taking into account the dependence structure of the sample. Another example is an expenditure survey for 2010
where for each sampled household I have measures of disposable income and expenditure, and I want to test whether
the expenditure distribution Lorenz dominates the income distribution taking into account the dependence induced
by the paired income-expenditure observations.

The data are assumed to be weighted, with record weights corresponding
to the inverse probability of an observational unit 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 unweighted -
this is easily handled by creating a weighting variable which is the same constant value
(eg weightx=1) for each observational unit.

If the samples are not matched pairs but are independent (such as a pure cross-section) then use
the ldtest command.

ldtestmp reports the run time in seconds. The run time is approximately linear in
bootreps. It is recommended that ldtestmp 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 ldtestmp 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: ldtest for testing with independent random samples of data (if installed)