Learn R Programming

panelvar (version 0.5.6)

bootstrap_irf: Empirical estimation of PVAR Impulse Response Confidence Bands

Description

Uses blockwise sampling of individuals (bootstrapping).

Usage

bootstrap_irf(
  model,
  typeof_irf,
  n.ahead,
  nof_Nstar_draws,
  confidence.band,
  mc.cores
)

# S3 method for pvargmm bootstrap_irf( model, typeof_irf = c("OIRF", "GIRF"), n.ahead, nof_Nstar_draws, confidence.band = 0.95, mc.cores = getOption("mc.cores", 2L) )

# S3 method for pvarfeols bootstrap_irf( model, typeof_irf = c("OIRF", "GIRF"), n.ahead, nof_Nstar_draws, confidence.band = 0.95, mc.cores = getOption("mc.cores", 2L) )

Arguments

model

A PVAR model

typeof_irf

"OIRF" or GIRF

n.ahead

n ahead steps

nof_Nstar_draws

Number of draws

confidence.band

Confidence band

mc.cores

Number of cores to use

Examples

Run this code
if (FALSE) {
data("ex1_dahlberg_data")
ex1_dahlberg_data_bs <-  bootstrap_irf(ex1_dahlberg_data, typeof_irf = c("GIRF"),
                                       n.ahead = 8,
                                       nof_Nstar_draws = 500,
                                       confidence.band = 0.95,
                                       mc.cores = 100)
                                           
                                           
}
data("ex1_dahlberg_data")
ex1_dahlberg_data_girf <-  girf(ex1_dahlberg_data, n.ahead = 8, ma_approx_steps= 8)
data("ex1_dahlberg_data_bs")
plot(ex1_dahlberg_data_girf, ex1_dahlberg_data_bs)

Run the code above in your browser using DataLab