boot_sqt {bootUR}  R Documentation 
Performs the Bootstrap Sequential Quantile Test (BSQT) proposed by Smeekes (2015).
boot_sqt(data, data_name = NULL, steps = 0:NCOL(data), bootstrap = "AWB",
B = 1999, block_length = NULL, ar_AWB = NULL, SQT_level = 0.05,
union = TRUE, deterministics = NULL, detrend = NULL, min_lag = 0,
max_lag = NULL, criterion = "MAIC", criterion_scale = TRUE,
show_progress = TRUE, do_parallel = TRUE, cores = NULL)
data 
A 
data_name 
Optional name for the data, to be used in the output. The default uses the name of the 'data' argument. 
steps 
Numeric vector of quantiles or units to be tested. Default is to test each unit sequentially. 
bootstrap 
String for bootstrap method to be used. Options are

B 
Number of bootstrap replications. Default is 1999. 
block_length 
Desired 'block length' in the bootstrap. For the MBB, BWB and DWB bootstrap, this is a genuine block length. For the AWB bootstrap, the block length is transformed into an autoregressive parameter via the formula 
ar_AWB 
Autoregressive parameter used in the AWB bootstrap method ( 
SQT_level 
Desired significance level of the sequential tests performed. Default is 0.05. 
union 
Logical indicator whether or not to use bootstrap union tests ( 
deterministics 
String indicating the deterministic specification. Only relevant if
If 
detrend 
String indicating the type of detrending to be performed. Only relevant if 
min_lag 
Minimum lag length in the augmented DickeyFuller regression. Default is 0. 
max_lag 
Maximum lag length in the augmented DickeyFuller regression. Default uses the sample sizebased rule 
criterion 
String for information criterion used to select the lag length in the augmented DickeyFuller regression. Options are: 
criterion_scale 
Logical indicator whether or not to use the rescaled information criteria of Cavaliere et al. (2015) ( 
show_progress 
Logical indicator whether a bootstrap progress update should be printed to the console. Default is FALSE. 
do_parallel 
Logical indicator whether bootstrap loop should be executed in parallel. Default is TRUE. 
cores 
The number of cores to be used in the parallel loops. Default is to use all but one. 
The parameter steps
can either be set as an increasing sequence of integers smaller or equal to the number of series N
, or fractions of the total number of series (quantiles). For N
time series, setting steps = 0:N
means each unit should be tested sequentially. In this case the method is equivalent to the StepM method of Romano and Wolf (2005), and therefore controls the familywise error rate. To split the series in K
equally sized groups, use steps = 0:K / K
.
By convention and in accordance with notation in Smeekes (2015), the first entry of the vector should be equal to zero, while the second entry indicates the end of the first group, and so on. If the initial 0
or final value (1
or N
) are omitted, they are automatically added by the function.
See boot_ur
for details on the bootstrap algorithm and lag selection.
An object of class "bootUR"
, "mult_htest"
with the following components:
method 
The name of the hypothesis test method; 
data.name 
The name of the data on which the method is performed; 
null.value 
The value of the (gamma) parameter of the lagged dependent variable in the ADF regression under the null hypothesis. Under the null, the series has a unit root. Testing the null of a unit root then boils down to testing the significance of the gamma parameter; 
alternative 
A character string specifying the direction of the alternative hypothesis relative to the null value. The alternative postulates that the series is stationary; 
estimate 
The estimated values of the (gamma) parameter of the lagged dependent variable in the ADF regressions. Note that for the union test ( 
statistic 
The value of the test statistic of the unit root tests; 
p.value 
A vector with 
rejections 
A vector with logical indicators for each time series whether the null hypothesis of a unit root is rejected ( 
details 
A list containing the detailed outcomes of the performed tests, such as selected lags, individual estimates and pvalues. In addtion, the slot 
series.names 
The names of the series that the tests are performed on; 
specifications 
The specifications used in the tests. 
Error: Resamplingbased bootstraps MBB and SB cannot handle missing values.
If the time series in data
have different starting and end points (and thus some series contain NA
values at the beginning and/or end of the sample, the resamplingbased moving block bootstrap (MBB) and sieve bootstrap (SB) cannot be used, as they create holes (internal missings) in the bootstrap samples. Switch to another bootstrap method or truncate your sample to eliminate NA
values.
Error: Invalid input values for steps: must be quantiles or positive integers.
Construction of steps
does not satisfy the criteria listed under 'Details'.
Warning: SB and SWB bootstrap only recommended for boot_ur; see help for details.
Although the sieve bootstrap methods "SB"
and "SWB"
can be used, Smeekes and Urbain (2014b) show that these are not suited to capture general forms of dependence across units, and using them for joint or multiple testing is not valid. This warning thereofre serves to recommend the user to consider a different bootstrap method.
Warning: Deterministic specification in argument deterministics is ignored, as union test is applied.
The union test calculates the union of all four combinations of deterministic components (intercept or intercept and trend) and detrending methods (OLS or QD). Setting deterministic components manually therefore has no effect.
Warning: Detrending method in argument detrend is ignored, as union test is applied.
The union test calculates the union of all four combinations of deterministic components (intercept or intercept and trend) and detrending methods (OLS or QD). Setting detrending methods manually therefore has no effect.
Smeekes, S. and Wilms, I. (2023). bootUR: An R Package for Bootstrap Unit Root Tests. Journal of Statistical Software, 106(12), 139.
Chang, Y. and Park, J. (2003). A sieve bootstrap for the test of a unit root. Journal of Time Series Analysis, 24(4), 379400.
Cavaliere, G. and Taylor, A.M.R (2009). Heteroskedastic time series with a unit root. Econometric Theory, 25, 1228–1276.
Cavaliere, G., Phillips, P.C.B., Smeekes, S., and Taylor, A.M.R. (2015). Lag length selection for unit root tests in the presence of nonstationary volatility. Econometric Reviews, 34(4), 512536.
Elliott, G., Rothenberg, T.J., and Stock, J.H. (1996). Efficient tests for an autoregressive unit root. Econometrica, 64(4), 813836.
Friedrich, M., Smeekes, S. and Urbain, J.P. (2020). Autoregressive wild bootstrap inference for nonparametric trends. Journal of Econometrics, 214(1), 81109.
Ng, S. and Perron, P. (2001). Lag Length Selection and the Construction of Unit Root Tests with Good Size and Power. Econometrica, 69(6), 15191554,
Palm, F.C., Smeekes, S. and Urbain, J.P. (2008). Bootstrap unit root tests: Comparison and extensions. Journal of Time Series Analysis, 29(1), 371401.
Palm, F. C., Smeekes, S., and Urbain, J..P. (2011). Crosssectional dependence robust block bootstrap panel unit root tests. Journal of Econometrics, 163(1), 85104.
Paparoditis, E. and Politis, D.N. (2003). Residualbased block bootstrap for unit root testing. Econometrica, 71(3), 813855.
Perron, P. and Qu, Z. (2008). A simple modification to improve the finite sample properties of Ng and Perron's unit root tests. Economic Letters, 94(1), 1219.
Rho, Y. and Shao, X. (2019). Bootstrapassisted unit root testing with piecewise locally stationary errors. Econometric Theory, 35(1), 142166.
Romano, J. P. and Wolf, M. (2005). Stepwise multiple testing as formalized data snooping. Econometrica, 73(4), 12371282. #' @references Shao, X. (2010). The dependent wild bootstrap. Journal of the American Statistical Association, 105(489), 218235.
Shao, X. (2011). A bootstrapassisted spectral test of white noise under unknown dependence. Journal of Econometrics, 162, 213224.
Smeekes, S. (2013). Detrending bootstrap unit root tests. Econometric Reviews, 32(8), 869891.
Smeekes, S. (2015). Bootstrap sequential tests to determine the order of integration of individual units in a time series panel. Journal of Time Series Analysis, 36(3), 398415.
Smeekes, S. and Taylor, A.M.R. (2012). Bootstrap union tests for unit roots in the presence of nonstationary volatility. Econometric Theory, 28(2), 422456.
Smeekes, S. and Urbain, J.P. (2014a). A multivariate invariance principle for modified wild bootstrap methods with an application to unit root testing. GSBE Research Memorandum No. RM/14/008, Maastricht University
Smeekes, S. and Urbain, J.P. (2014b). On the applicability of the sieve bootstrap in time series panels. Oxford Bulletin of Economics and Statistics, 76(1), 139151.
# boot_sqt on GDP_BE and GDP_DE
two_series_boot_sqt < boot_sqt(MacroTS[, 1:2], bootstrap = "AWB", B = 199,
do_parallel = FALSE, show_progress = FALSE)
print(two_series_boot_sqt)