Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

boot.rq

Bootstrapping Quantile Regression


Description

These functions can be used to construct standard errors, confidence intervals and tests of hypotheses regarding quantile regression models.

Usage

boot.rq(x, y, tau = 0.5, R = 200, bsmethod = "xy", mofn = length(y), 
	coef = NULL, blbn = NULL, cluster = NULL, U = NULL,  ...)

Arguments

x

The regression design matrix

y

The regression response vector

tau

The quantile of interest

R

The number of bootstrap replications

bsmethod

The method to be employed. There are (as yet) five options: method = "xy" uses the xy-pair method, and method = "pwy" uses the method of Parzen, Wei and Ying (1994) method = "mcmb" uses the Markov chain marginal bootstrap of He and Hu (2002) and Kocherginsky, He and Mu (2003). The fourth method = "wxy" uses the generalized bootstrap of Bose and Chatterjee (2003) with unit exponential weights, see also Chamberlain and Imbens (2003). The fifth method "wild" uses the wild bootstrap method proposed by Feng, He and Hu (2011).

mofn

optional argument for the bootstrap method "xy" that permits subsampling (m out of n) bootstrap. Obviously mofn should be substantially larger than the column dimension of x, and should be less than the sample size.

coef

coefficients from initial fitted object

blbn

orginal sample size for the BLB model

cluster

If non-NULL this argument should specify cluster id numbers for each observation, in which case the clustered version of the bootstrap based on the proposal of Hagemann (2017). If present bsmethod is set to set to "cluster". If this option is used and the fitting method for the original call was "sfn" then the bootstrapping will be carried out with the "sfn" as well. This is usually substantially quicker than the older version which employed the "br" variant of the simplex method. Use of "sfn" also applies to the "pwy" method when the original fitting was done with "sfn". Finally, if na.action = "omit" and length(object$na.action) > 0 then these elements are also removed from the cluster variable. Consequently, the length of the cluster variable should always be the same as the length of the original response variable before any na.action takes place.

U

If non-NULL this argument should specify an array of indices or gradient evaluations to be used by the corresponding bootstrap method as specified by bsmethod. This is NOT intended as a user specified input, instead it is specified in summary.rqs to ensure that bootstrap samples for multiple taus use the same realizations of the random sampling.

...

Optional arguments to control bootstrapping

Details

Their are several refinements that are still unimplemented. Percentile methods should be incorporated, and extensions of the methods to be used in anova.rq should be made. And more flexibility about what algorithm is used would also be good.

Value

A list consisting of two elements: A matrix B of dimension R by p is returned with the R resampled estimates of the vector of quantile regression parameters. When mofn < n for the "xy" method this matrix has been deflated by the factor sqrt(m/n). A matrix U of sampled indices (for bsmethod in c("xy", "wxy")) or gradient evaluations (for bsmethod in c("pwy", "cluster")) used to generate the bootstrapped realization, and potentially reused for other taus when invoked from summary.rqs.

Author(s)

Roger Koenker (and Xuming He and M. Kocherginsky for the mcmb code)

References

[1] Koenker, R. W. (1994). Confidence Intervals for regression quantiles, in P. Mandl and M. Huskova (eds.), Asymptotic Statistics, 349–359, Springer-Verlag, New York.

[2] Kocherginsky, M., He, X. and Mu, Y. (2005). Practical Confidence Intervals for Regression Quantiles, Journal of Computational and Graphical Statistics, 14, 41-55.

[3] Hagemann, A. (2017) Cluster Robust Bootstrap inference in quantile regression models, Journal of the American Statistical Association , 112, 446–456.

[4] He, X. and Hu, F. (2002). Markov Chain Marginal Bootstrap. Journal of the American Statistical Association , Vol. 97, no. 459, 783-795.

[5] Parzen, M. I., L. Wei, and Z. Ying (1994): A resampling method based on pivotal estimating functions,” Biometrika, 81, 341–350.

[6] Bose, A. and S. Chatterjee, (2003) Generalized bootstrap for estimators of minimizers of convex functions, J. Stat. Planning and Inf, 117, 225-239.

[7] Chamberlain G. and Imbens G.W. (2003) Nonparametric Applications of Bayesian Inference, Journal of Business & Economic Statistics, 21, pp. 12-18.

[8] Feng, Xingdong, Xuming He, and Jianhua Hu (2011) Wild Bootstrap for Quantile Regression, Biometrika, 98, 995–999.

See Also

Examples

y <- rnorm(50)
x <- matrix(rnorm(100),50)
fit <- rq(y~x,tau = .4)
summary(fit,se = "boot", bsmethod= "xy")
summary(fit,se = "boot", bsmethod= "pwy")
#summary(fit,se = "boot", bsmethod= "mcmb")

quantreg

Quantile Regression

v5.85
GPL (>= 2)
Authors
Roger Koenker [cre, aut], Stephen Portnoy [ctb] (Contributions to Censored QR code), Pin Tian Ng [ctb] (Contributions to Sparse QR code), Blaise Melly [ctb] (Contributions to preprocessing code), Achim Zeileis [ctb] (Contributions to dynrq code essentially identical to his dynlm code), Philip Grosjean [ctb] (Contributions to nlrq code), Cleve Moler [ctb] (author of several linpack routines), Yousef Saad [ctb] (author of sparskit2), Victor Chernozhukov [ctb] (contributions to extreme value inference code), Ivan Fernandez-Val [ctb] (contributions to extreme value inference code), Brian D Ripley [trl, ctb] (Initial (2001) R port from S (to my everlasting shame -- how could I have been so slow to adopt R!) and for numerous other suggestions and useful advice)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.