% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{bootstrap_irf}
\alias{bootstrap_irf}
\alias{bootstrap_irf.pvargmm}
\alias{bootstrap_irf.pvarfeols}
\title{Empirical estimation of PVAR Impulse Response Confidence Bands}
\usage{
bootstrap_irf(
  model,
  typeof_irf,
  n.ahead,
  nof_Nstar_draws,
  confidence.band,
  mc.cores
)

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

\method{bootstrap_irf}{pvarfeols}(
  model,
  typeof_irf = c("OIRF", "GIRF"),
  n.ahead,
  nof_Nstar_draws,
  confidence.band = 0.95,
  mc.cores = getOption("mc.cores", 2L)
)
}
\arguments{
\item{model}{A PVAR model}

\item{typeof_irf}{\code{"OIRF"} or \code{GIRF}}

\item{n.ahead}{n ahead steps}

\item{nof_Nstar_draws}{Number of draws}

\item{confidence.band}{Confidence band}

\item{mc.cores}{Number of cores to use}
}
\description{
Uses blockwise sampling of individuals (bootstrapping).
}
\examples{
\dontrun{
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)

}
