| sboot.mg | R Documentation |
Calculates confidence bands for impulse response functions via mean group inference.
The function does not perform bootstraps, but coerces the panel VAR object to class 'sboot'
and, therewith, gives a distributional overview on the parameter heterogeneity.
sboot.mg(x, n.ahead = 20, normf = NULL, idx_i = NULL)
x |
Panel VAR object of class ' |
n.ahead |
Integer. Number of periods to consider after the initial impulse, i.e. the horizon of the IRF. |
normf |
Function. A given function that normalizes the |
idx_i |
Logical or character vector.
Names or |
MG inference presumes the individual estimates to be the empirical variation
around a common parameter. In case of heterogeneous lag-orders p_i,
specifically the 'summary' of VAR coefficient matrices fills
\hat{A}_{ij} = 0_{K \times K} for p_i < j \le max(p_1,\ldots,p_N)
in accordance with the finite order VAR(p_i).
A list of class 'sboot2' with elements:
true |
Mean group estimate of impulse response functions. |
bootstrap |
List of length |
A |
List for the VAR coefficients containing
the matrix of mean group estimates ' |
B |
List for the structural impact matrix containing
the matrix of mean group estimates ' |
pvarx |
Input panel VAR object of class ' |
nboot |
Integer '0' indicating that no bootstrap iteration has been performed. |
method |
Method used for inference. |
Pesaran, M. H., and Smith R. J. (1995): "Estimating Long-Run Relationships from Dynamic Heterogeneous Panels", Journal of Econometrics, 68, pp. 79-113.
For an actual panel bootstrap procedure see sboot.pmb.
data("PCAP")
names_k = c("g", "k", "l", "y") # variable names
names_i = levels(PCAP$id_i) # country names
L.data = sapply(names_i, FUN=function(i)
ts(PCAP[PCAP$id_i==i, names_k], start=1960, end=2019, frequency=1),
simplify=FALSE)
R.lags = c(2, 4, 2, 3, 2, 4, 4, 2, 2, 3, 3, 3, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 4)
names(R.lags) = names_i
idx_nord = c("DNK", "FIN", "ISL", "SWE")
R.pvec = pvarx.VEC(L.data, lags=R.lags, dim_r=2, type="Case4")
R.pid = pid.chol(R.pvec)
R.boot = sboot.mg(R.pid, idx_i=idx_nord)
plot(R.boot, lowerq=c(0, 0.25), upperq=c(1, 0.75))
summary(as.pvarx(R.pid$L.varx[idx_nord]))
# suppress imprecise results of restricted cointegrating coefficients #
dim_r = R.pvec$args_pvarx$dim_r
R.boot$beta$sim[ , 1:dim_r, ] = diag(dim_r) # for normalized beta
summary(R.boot, idx_par="beta", level=0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.