Inference on quantiles: confidence intervals, p-values, and testing (Scripts) Publisher's description
from David Kaplan
This code implements a new method for quantile inference based on theoretical work found here
This code implements a new method for quantile inference based on theoretical work found here: http://econ.ucsd.edu/~dkaplan/personalResearch.html
Extensive simulations (Section 6 of paper has some examples) have shown it to control size better than bootstrap ("BS") methods and the analytic Hall and Sheather (1988; "HS") method, while maintaining competitive power. In some cases, power is dramatically better for the new method. In the language of confidence intervals (CIs), empirical coverage probabilities are much less likely to be smaller than nominal. So when you calculate a 95% CI, BS and HS may actually give you a 90% CI, while the new method gives you a 95% (at least) CI, or at least one closer to 95% than BS and HS. "Power" corresponds to shorter interval lengths.
This new method builds on the work of HS and Goh (2004) to improve testing properties via testing-optimal smoothing parameter selection using Edgeworth expansions and smoothing parameter dependent critical values.
It provides hypothesis testing (reject/don't), p-values, and confidence intervals.
For example, if you have a univariate data sample and want to test if it is from a population with median (or whichever quantile/percentile) equal to zero, you can get a p-value, run this test at a 5% (or whatever value you input) level, and get a 95% (or whatever value you want) confidence interval for the median.
If you have two samples (say, treatment and control), you can test for equality at any quantile (percentile), either computing a p-value or testing at a specified level.
Documentation includes further explanation and examples; just type "help quantile_test"
System Requirements:MATLAB 7.12 (2011a)
Program Release Status: New Release
Program Install Support: Install and Uninstall