Learn R Programming

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

About

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 released version of lpirfs from CRAN with:

install.packages("lpirfs")

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

666

Version

0.1.1

License

GPL (>= 2)

Maintainer

Philipp Ad<c3><a4>mmer

Last Published

July 20th, 2018

Functions in lpirfs (0.1.1)

plot_nl_irfs

Compute and display plots of nonlinear impulse responses
interest_rules_var_data

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

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

Compute linear impulse responses
get_vals_switching

Compute values of transition function to separate regimes
hp_filter

Decompose a times series via the Hodrick-Prescott filter
lp_nl

Compute nonlinear impulse responses
lpirfs-package

Local Projection Impulse Response Functions
get_resids_ols

Compute residuals from OLS model
get_vals_lagcrit

Compute values for lag length criterion
plot_lin_irfs

Compute and display plots of linear impulse responses
create_lags

Compute a data frame with lagged exogenous variables
create_nl_data

Compute data for nonlinear model
get_mat_chol

Compute structural shock matrix via Cholesky decomposition
create_lin_data

Compute data for linear model
monetary_var_data

Data to estimate a standard monetary VAR