help for xtiletest

Test equality of percentiles across groups of observations

xtiletest varname [if exp] [in range],
[weight] by(string) xtile(numlist)

Description

xtiletest computes specified percentiles of a variable, and tests them for equality
across groups of observations. The test is based on Johnson et al. (2015), in which it is shown
that the hypothesis of equality of percentiles across groups
can be expressed as a standard Chi-squared goodness of fit test, as produced by Stata's
tabulate command. Under the null that m specified percentiles are equal over n
groups, the test statistic is distributed Chi-square with (m-1)(n-1) degrees of freedom.
fweights are allowed.

Options

by(string) is a required option. It provides the name of the variable
defining groups within varname. If multiple variables are to be considered as group
identifiers, egen group) may be used to construct a single by-variable.

xtile(numlist) is a required option. It must contain a number of
integer values of percentiles to be computed for {\it:varname} and for each group within varname.
As in the _pctile command, these values must be in ascending order.

Examples

. webuse nlsw88

. xtiletest wage, by(union) xtile(25 50 75)

. xtiletest wage, by(union) xtile(20 40 60 80)

. xtiletest hours, by(married) xtile(25 50 75)

. xtiletest tenure if occupation<=3, by(occupation) xtile(25 50 75)

Reference

WD Johnson et al., Use of Pearson’s Chi-Square for Testing Equality of Percentile Profiles across Multiple Populations, Open Journal of Statistics, 2015, 5:412-420. DOI 10.4236/ojs.2015.55043

Author

Christopher F Baum, Boston College, USA

baum@bc.edu