% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/irf.R
\name{irf}
\alias{irf}
\title{Impulse Response Functions for Dynamic Panel Models}
\usage{
irf(object, impulse, horizon = 10L, boot_reps = 200L, seed = NULL)
}
\arguments{
\item{object}{A \code{dcce_fit} object from a dynamic model (must
contain at least one \code{L(y, k)} term).}

\item{impulse}{Character: the regressor that receives the shock.}

\item{horizon}{Integer: number of periods to trace. Default 10.}

\item{boot_reps}{Integer: bootstrap replications for confidence bands.
0 = no bands. Default 200.}

\item{seed}{Integer: random seed.}
}
\value{
An object of class \code{dcce_irf} containing the impulse
response path (\code{$irf}), optional bootstrap lower/upper bands,
and metadata (impulse variable name and horizon length).
}
\description{
Computes impulse response functions (IRFs) from a fitted dynamic panel
model (DCCE, CS-ARDL, or PMG). The IRF traces the response of the
dependent variable to a one-unit shock in a specific regressor over
a given number of horizons, using the Mean Group ARDL coefficient
estimates and the autoregressive lag polynomial.
}
\details{
Confidence bands are computed via the cross-section bootstrap: units
are resampled with replacement, the MG coefficients are recomputed,
and the IRF is re-traced. The 2.5 and 97.5 percent quantiles of the
bootstrap distribution form the 95 percent band.
}
\examples{
data(dcce_sim)
fit <- dcce(
  data = dcce_sim, unit_index = "unit", time_index = "time",
  formula = y ~ L(y, 1) + x,
  model = "dcce", cross_section_vars = ~ ., cross_section_lags = 3
)
ir <- irf(fit, impulse = "x", horizon = 10, boot_reps = 0)
print(ir)
}
