knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The R package QregBB accompanies the paper:
Gregory, K.B., Lahiri, S.N., Nordman, D.J. (2018). A smooth block bootstrap for quantile regression with time series. Annals of Statistics 46(3), 1138-1166
Find the paper at https://projecteuclid.org/euclid.aos/1525313078.
You can install the development version of QregBB from GitHub with:
# install.packages("devtools") devtools::install_github("gregorkb/QregBB")
The main function in the package is QregBB
, which performs the MBB, SMBB, ETBB, and SETBB bootstrap procedures (all at once) for estimating the sampling distributions of quantile regression estimators with time series data.
library(QregBB) n <- 50 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
The function getNPPIblksizesQR
implements the block size selection method described in Gregory et al. (2018) for MBB, SMBB, ETBB, and SETBB.
blksize.out <- getNPPIblksizesQR(Y,X,tau=.5) blksize.out
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.