SVARIV | R Documentation |
Implements standard and weak-IV robust SVAR-IV inference.
SVARIV( ydata, z, p, confidence, NWlags, norm, scale, horizons, ci_type = c("msw"), print_wald = T, instrument_name )
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) |
irfs: list containing all irf data
waldstat: contain msw waldstat
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.