externalinstrument: Identify the impulse response for a VAR (using the VAR...

View source: R/varexternalinstrument.R

externalinstrumentR Documentation

Identify the impulse response for a VAR (using the VAR estimated from the vars package), using a high frequency instrument.

Description

Identify the impulse response for a VAR (using the VAR estimated from the vars package), using a high frequency instrument.

Usage

externalinstrument(var, instrument, dependent, p)

Arguments

var

A varest var, or a dataframe of reduced form residuals.

instrument

A list containing the data for the instrument. Should be same length as the estimation sample.

dependent

Which variable in your var are you instrumenting (as a string).

p

(Integer) How many lags does your var have (only needed if supplying a dataframe instead of a varest).

Examples

library(vars)
library(varexternalinstrument)
data(GKdata)
gkvar <- VAR(GKdata[, c("logip", "logcpi", "gs1", "ebp")], p = 12, type = "const")
shockcol <- externalinstrument(gkvar, GKdata$ff4_tc, "gs1")


angusmoore/varexternalinstrument documentation built on Sept. 5, 2022, 6:38 p.m.