Learn R Programming

⚠️There's a newer version (0.2.4) of this package.Take me there.

lpirfs

An R-package which estimates linear and nonlinear impulse responses with local projections by Jordà (2005).

Main features

  • Estimates linear and nonlinear impulse responses with local projections.
  • Functions to plot linear and nonlinear impulse responses.
  • Functions are partly implemented in Rcpp and RcppArmadillo to improve efficiency.
  • High performance with parallel computation.

Examples

Examples can be found here.

Installation

You can install the development version of lpirfs from GitHub:

# install.packages("devtools")
devtools::install_github("AdaemmerP/lpirfs")

The package compiles some C++ source code for installation, which is why you need the appropriate compilers:

On Windows you need Rtools available from CRAN.

On macOS you need the Clang 6.x compiler and the GNU Fortran compiler from macOS tools. Having installed the compilers, you need to open a terminal and start R via 'PATH=/usr/local/clang6/bin:$PATH R'. Yo can then install the package via devtools::install_github("AdaemmerP/lpirfs")

Acknowledgements

I greatly benefit from the profound R, Rcpp and GitHub knowledge of Philipp Wittenberg and Detlef (overflow) Steuer. Remaining errors are obviously mine.

Development

I intend to extend the package with functions that

  • allow to manually identify the linear combinations of the reduced form residuals,
  • allow to include exogenous variables,
  • conduct IV-lp estimation,
  • conduct panel-lp estimation.

Author

Philipp Adämmer

License

GPL (>= 2)

Copy Link

Version

Install

install.packages('lpirfs')

Monthly Downloads

875

Version

0.1.0

License

GPL (>= 2)

Maintainer

Philipp Ad<c3><a4>mmer

Last Published

July 5th, 2018

Functions in lpirfs (0.1.0)

lp_lin

Compute linear impulse responses
find_lag_c

Compute optimal lag length
create_nl_data

Compute data for nonlinear model
lp_nl

Compute nonlinear impulse responses
monetary_var_data

Data to estimate a standard monetary VAR
create_lags

Compute a data frame with lagged exogenous variables
lm_function

Compute residuals from OLS model
plot_nl_irfs

Compute and display plots of nonlinear impulse responses
create_lin_data

Compute data for linear model
reduced_var

Compute structural shock matrix via Cholesky decomposition
lpirfs-package

Local Projection Impulse Response Functions
interest_rules_var_data

Data to estimate the effects of interest rate rules for monetary policy
plot_lin_irfs

Compute and display plots of linear impulse responses
switching_series

Compute values of transition function to separate regimes
newey_west_c

Compute OLS parameters and robust standard errors based on Newey-West estimator