The spiv package provides an R implementation of the System Projections with Instrumental Variables (SP-IV) methodology using Local Projections.
This package implements the methods developed in: * Lewis, D. J., & Mertens, K. (2024). Dynamic Identification Using System Projections and Instrumental Variables, available at https://karelmertens.com/research/. * Methodology sourced from the Federal Reserve Bank of Dallas Working Paper 2204 : https://doi.org/10.24149/wp2204.
Disclaimer: This is an unofficial, community-contributed implementation of the SP-IV methodology. It is not affiliated with, nor endorsed by, the original authors or the Federal Reserve Bank of Dallas. The maintainer is solely responsible for any errors in the software implementation.
You can install the development version of spiv from GitHub with:
devtools::install_github("https://github.com/gauthiersr/spiv")
The grid search evaluates grid_length. When working with grid_length to 20 or 30). AR should be prioritized over KLM if efficiency is a concern. Set cores to match your hardware capacity to distribute the load.
Impulse Response Functions for both the outcome and endogenous variables are available in the output of the spiv function. The plot command only plots IRFs with HAC confidence intervals.