QregBB | R Documentation |
Implements MBB, ETBB, SMBB, and SETBB for quantile regression
QregBB(Y, X, tau, l, B = 500, h = NULL, alpha = 0.05)
Y |
the vector of response values. |
X |
the design matrix (including a column of ones for the intercept). |
tau |
the quantile of interest. |
l |
block size. |
B |
the number of Monte Carlo bootstrap samples to draw. |
h |
a scalar bandwidth (bandwidth matrix is |
alpha |
a significance level to which the returned confidence intervals will correspond. |
A list is returned containing for the MBB, SMBB, ETBB, and SETBB the set of Monte Carlo draws of the pivot quantity √{n}(\hat β^*_n - \tilde β_n), confidence intervals for each component of β corresponding to the specified confidence level, and estimates of the asymptotic covariance matrix of the pivot quantity √{n}(\hat β_n - β).
#' @references
Gregory, K. B., Lahiri, S. N., & Nordman, D. J. (2018). A smooth block bootstrap for quantile regression with time series. *The Annals of Statistics*, 46(3), 1138-1166.
A 'print.QregBB' method exists which prints to the console the bootstrap standard errors for each coefficient estimator from the MBB, SMBB, ETBB, and SETBB methods as well as confidence intervals for each coefficient at the specified level.
# generate some data and perform block-bootstrap methods n <- 100 X1 <- arima.sim(model=list(ar=c(.7,.1)),n) X2 <- arima.sim(model=list(ar=c(.2,.1)),n) e <- arima.sim(model=list(ar=c(.7,.1)),n) Y <- X1 + e X <- cbind(rep(1,n),X1,X2) QregBB.out <- QregBB(Y,X,tau=.5,l=4,B=500,h=NULL,alpha=0.05) QregBB.out
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.