Stata Command: exquantile.ado
Estimation and inference for (conditional) extremal quantiles based on the nearest neighbor method for the Hill's estimator of the tail index in the increasing-k framework, cf. Appendix A.5 of Sasaki and Wang (2021) (The fixed-k framework does not provide an estimate or a standard error, and hence it is not implemented in the current Stata command. Interested researchers can find a MATLAB code here for constructing fixed-k confidence intervals.) Use it when you want to compute (conditional) extremal quantiles, such as the (conditional) 0.1-th percentile or the (conditional) 99.9-th percentile, which cannot be estimated well by the standard quantile methods. For instance, the following Stata output displays show the 1st (top) and 0.1th (bottom) conditional quantiles of the birth weight in grams for smoking mothers at age 40.
Installation:
. ssc install exquantile
Usage:
. use "natl_random.dta"
. xtset id time
. exquantile birwt age if !nosmoke, q(0.01) xval(40)
Help:
. help exquantile
Reference: Sasaki, Y & Y. Wang (2022) Fixed-k Inference for Conditional Extremal Quantiles. Journal of Business & Economic Statistics , 40 (2), pp. 829-837. Paper.