SVARIV: SvAR-IV.

View source: R/SVARIV.R

SVARIVR Documentation

SvAR-IV.

Description

Implements standard and weak-IV robust SVAR-IV inference.

Usage

SVARIV(
  ydata,
  z,
  p,
  confidence,
  NWlags,
  norm,
  scale,
  horizons,
  ci_type = c("msw"),
  print_wald = T,
  instrument_name
)

Arguments

ydata

Endogenous variables from the VAR model

z

External instrumental variable

p

Number of lags in the VAR model

confidence

Value for the standard and weak-IV robust confidence set

NWlags

Newey-West lags (set it to 0 to compute heteroskedasticity robust std errors)

norm

Variable used for normalization

scale

Scale of the shock

horizons

Number of horizons for the Impulse Response Functions (does not include the impact or horizon 0)

ci_type

confidence intervals to include (choose from "msw" (Montiel, Stock and Watson, 2020), "delta" or "plugin"), just triggers msw waldtest. specify ci by prett.irf command

print_wald

Number of horizons for the Impulse Response Functions (does not include the impact or horizon 0)

instrument_name

Number of horizons for the Impulse Response Functions (does not include the impact or horizon 0)

Value

irfs: list containing all irf data

waldstat: contain msw waldstat

Examples




p           = 24    #Number of lags in the VAR model
NWlags      = 0;  # Newey-West lags(if it is neccessary to account for time series autocorrelation)
norm        = 1; # Variable used for normalization
scale       = 1; # Scale of the shock
horizons    = 20; #Number of horizons for the Impulse Response Functions(IRFs)
confidence=c(0.6,0.9,0.95);
data(oil)
colnames(oil)<-c("a","b","c","d","year","month")
ydata<-oil[,1:3]
z<-oil[,4]
VAR<-SVARIV(ydata,z,p,confidence,NWlags,norm,scale,horizons,instrument_name="test")


martinbaumgaertner/varexternal documentation built on April 27, 2022, 1:31 a.m.