Learn R Programming

pvars (version 1.1.1)

sboot.mg: Mean group inference for panel SVAR models

Description

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.

Usage

sboot.mg(x, n.ahead = 20, normf = NULL, idx_i = NULL)

Value

A list of class 'sboot2' with elements:

true

Mean group estimate of impulse response functions.

bootstrap

List of length \(N\) holding the individual impulse response functions.

A

List for the VAR coefficients containing the matrix of mean group estimates 'par' and the array of individual results 'sim'.

B

List for the structural impact matrix containing the matrix of mean group estimates 'par' and the array of individual results 'sim'.

pvarx

Input panel VAR object of class 'pvarx'.

nboot

Integer '0' indicating that no bootstrap iteration has been performed.

method

Method used for inference.

Arguments

x

Panel VAR object of class 'pid' or 'pvarx' or a list of VAR objects that will be coerced to 'varx'.

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 \(K \times S\) input-matrix into an output matrix of same dimension. See the example in id.iv for the normalization of Jentsch and Lunsford (2021) that fixes the size of the impact response in the IRF.

idx_i

Logical or character vector. Names or \(N\) logical elements selecting a subset from the individuals \(i = 1, \ldots, N\) for the MG estimation. If NULL (the default), all \(N\) individuals are included.

Details

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)\).

References

Pesaran, M. H., and Smith R. J. (1995): "Estimating Long-Run Relationships from Dynamic Heterogeneous Panels", Journal of Econometrics, 68, pp. 79-113.

See Also

For an actual panel bootstrap procedure see sboot.pmb.

Examples

Run this code
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)

Run the code above in your browser using DataLab