bootsemi {boodd}R Documentation

Semiparametric Bootstrap

Description

The function performs a semiparametric bootstrap for a general statistics, using a time-series model.

Usage

bootsemi(
  x,
  func,
  B,
  model = c("ARIMA", "GARCH"),
  params,
  model.fit = NULL,
  model.sim = NULL,
  H0 = FALSE,
  PAR0 = NULL,
  ...
)

Arguments

x

A vector or a time series representing the data.

func

The function to apply to each sample.

B

A positive integer; the number of bootstrap replications.

model

The chosen model to fit the time series. Either "ARIMA" or "GARCH", else model.fit and model.sim should be specified.

params

The parameters of the model (see below).

model.fit

A function fitting the parameters for the generic model (see below). By default NULL.

model.sim

A function simulating the data for the generic model (see below). By default NULL.

H0

Logical. Only implemented for the ARIMA and GARCH models. If H0 = TRUE, the value(s) of the parameter(s) under the null PAR0 should be specified. Then, the model is simulated under the null hypothesis. By default it is NULL.

PAR0

The value of the parameter that we want to test under the null hypothesis. By default it is FALSE.

...

Optional additional arguments for the func function.

Details

The default basic models currently supported are : ARIMA and GARCH.

The argument params specifies the orders of the chosen model. In the case of ARIMA, it is a vector of the form c(p,q) or c(p,d,q). In the case of GARCH, it is a vector of the form c(q) or c(p,q) corresponding to an ARCH(q) or GARCH(p,q) model, respectively.

Alternatively, one can specify two functions in the model.fit and model.sim arguments. They are used to implement a generic bootstrap procedure, which first estimates the model with model.fit and then simulates the bootstrap time series with model.sim. The model.fit function has the following prototype:

    model.fit(x,params)
  

It receives the params argument specified in the bootsemi function. It should return an object describing the model (typically a list containing all the necessary components for the model). The model.sim function has the following prototype:

    model.sim(model,innovations,params)
  

The innovations argument is the resampled vector of centered residuals. The function builds a new trajectory of the original process using the estimators provided by the model.fit function.

The Examples section below shows how this can be done in the case of a Threshold Autoregressive (TAR) process.

Parameters HO and PAR0 may be used to generate the bootstrap distribution of the statistic of interest under a specific null hypothesis. This option may be useful, for instance, for ARIMA models with unit roots. In that case, the usual bootstrap dose not work, unless one simulates the process under the null hypothesis of unit root.

Value

bootsemi returns an object of class boodd (see class.boodd).

References

Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.

Lahiri, S. N. (2003). Resampling Methods for Dependent Data. Springer N.Y..

Shimizu, K. .(2017). Bootstrapping Stationary ARMA-GARCH Models. Springer Fachmedien Wiesbaden.

Park, J.Y. (2003). Bootstrap unit-root tests, Econometrica, 77, 1845-1895.

See Also

blockboot, plot.boodd, confint.boodd.

Examples


# An ARIMA(2,1) process
library(stats)
B <- 299
n <- 200
x <- arima.sim(model=list(ar=c(0.8,-0.4),ma=c(0.2)),n=n)
boo1 <- bootsemi(x,mean,B,model="ARIMA",params=c(2,1))
plot(boo1)


[Package boodd version 0.1 Index]