1 - An R Package To Estimate Impulse Response Functions by Local Projections
1 - An R Package To Estimate Impulse Response Functions by Local Projections
Introduction
Since the seminal paper of Sims (1980), analysing economic time series by Vector Auto Regressive (VAR)
models has become a main pillar in empirical macroeconomic analysis. VARs have been traditionally
used to recover structural shocks in order to estimate their propagating effects on economic variables.
This approach, however, has been criticized for several drawbacks such as the imposed dynamics on
the (economic) system, the curse of dimensionality and the more difficult application to nonlinearities
(Auerbach and Gorodnichenko, 2013).
Estimating impulse response functions using local projections (LPs) has become an appealing
alternative, which is reflected in the over 1,000 citations of the pioneering paper by Jordà (2005).
Instead of extrapolating the parameters into increasingly distant horizons, LPs estimate the parameters
sequentially at each point of interest. It is argued that LPs offer three advantages over the traditional
structural vector autoregressive (SVAR) approach: first, LPs are easier to estimate since they rely solely
on simple linear regressions; second, the point or joint-wise inference is easily conducted; and third,
impulse responses that are estimated using LPs are more robust when a (linear) VAR is misspecified
(Jordà, 2005). Although the latter argument has been questioned by Kilian and Kim (2011), the recent
study by Brugnolini (2018) shows equal and even better performance of LPs when the lag lengths
for each forecast horizon are adequately fixed. Yet, Plagborg-Møller and Wolf (2019) proved that LPs
and VAR models estimate the same impulse responses when the lag structures are unrestricted. This
finding implies that empirical impulse responses that are estimated using LPs and SVARs are likely
similar at short horizons but differ at longer ones.1
Since their introduction in 2005, LPs have been broadly applied to investigate, among others, the
macroeconomic effects of oil price shocks (Hamilton, 2011); state-dependent government spending
multipliers (Owyang et al., 2013; Auerbach and Gorodnichenko, 2012, 2013); the effects of monetary
policy on financial markets and economic aggregates (Tenreyro and Thwaites, 2016; Swanson, 2017;
Jordà et al., 2019); and the link between credit growth, monetary policy, house prices, and financial
stability (Jordà et al., 2015; Favara and Imbs, 2015; Jordà and Taylor, 2016). Apart from the different
research questions, these studies further differ regarding the data structures because they use panel
and nonpanel data.
Despite the rising popularity and applications, no R package yet exists that can estimate impulse
responses using LPs. The only exception is the code for the smooth LP approach by Barnichon and
Brownlees (2019). The approach reduces the variance of the LP parameters with a linear B-spline basis
function because LP coefficients can suffer from high variance, sometimes making the interpretation
more difficult. The code is partly available on GitHub and has been applied by Garín et al. (2019). The
vars package by Pfaff (2008) only allows estimating impulse response functions that are based on the
traditional SVAR approach.
As a remedy, this paper introduces lpirfs (Adämmer, 2019), a fast and flexible R package that
enables estimating and visualizing impulse responses using LPs for a variety of data sets. The first
part of this paper outlines the theory of LPs and the differences from the traditional SVAR approach.
The second part outlines the main functions and options of the package, and the last section applies
lpirfs by replicating the empirical results from the economic literature.
1 The appendix contains a comparison of impulse responses that are estimated using LPs and the traditional
SVAR approach.
B0 Y t = α t + B ( L ) Y t + ε t .
The residuals εt are assumed to be white noise with zero mean.2 This representation is appealing
from an economic perspective because the structural shocks are contemporaneously uncorrelated, and
the variables have a contemporaneous effect on each other. The contemporaneous effect is measured
by the square matrix B0 . However, estimating this SVAR without further assumptions is not possible
because of the simultaneous identification problem. Merely assuming that the structural shocks are
orthogonal does not fully identify the system.
The SVAR in reduced form (henceforth VAR) equals:
Yt = α̃ + B̃( L)Yt + ut ,
where
α̃ = B0 −1 α, B̃( L) = B0 −1 B(L)
and 2
σ1 ... 2
σ1,n
. .. .. , for t = τ
..
0
E[ut , uτ ] = . .
σn,1
... σn2
0, else.
The coefficient matrix B̃( L) is a nonlinear function of the contemporaneous parameter matrix B0
and the structural parameter matrix B( L). In contrast to the SVAR, the VAR residuals ut are contem-
poraneously correlated, which impedes an unbiased economic interpretation. The VAR residuals are
assumed to be linked to the SVAR shocks by the following:
0 0
ut = B0 −1 εt , E[ut ut ] = Σu = B0 −1 B0 −1 .
Given that the covariance matrix of εt equals the identity matrix, one must still impose n(n − 1)/2
restrictions to estimate the structural form. The most general approach is to separate the residuals
into orthogonal shocks by calculating a Cholesky decomposition of the covariance matrix Σu . The
first variable in such a system responds to its own exogenous shock, the second variable to the first
variable plus an exogenous shock to the second variable, and so on. The results thus depend on
ordering (Keating, 1992). The Wold representation states that any covariance-stationary time series can
be rewritten as a sum of present and past innovations. This theorem enables mapping the estimated
VAR(p) coefficients recursively to the infinite-order vector moving-average coefficients (Brugnolini,
2018). Impulse response functions are estimated iteratively by rewriting VAR(p) into its companion
form (i.e., a VAR(1)):
2 The assumption of independent and identically distributed innovations is common in applied work but can be
ˆ ( 0 ) = B0 − 1
IR
ˆ ( 1 ) = Φ 1 B0 − 1
IR
ˆ ( 2 ) = Φ 2 B0 − 1
IR
..
. ,
where αh is a vector of constants, and Bih are parameter matrices for lag p and forecast horizon h.
The vector elements uth+h are autocorrelated and/or heteroscedastic disturbances. The collection of all
regressions of Eq. (1) are called LPs. The slope matrix B1h can be interpreted as the response of yt+h to
a reduced form shock in t (Kilian and Kim, 2011). Structural impulse responses are then estimated by
the following:
ˆ (t, h, di ) = B̂h di ,
IR 1
where di = B0−1 . As in the SVAR approach, the shock matrix di must be identified from a linear
VAR. The LP approach thus does not overcome the problem of identification. Given the serial
correlation of uth+h , Jordà (2005) proposed to estimate robust standard errors using the approach by
Newey and West (1987).
A great advantage of LPs is their easy extension to nonlinear frameworks. The simplest approach
to separate data into two regimes is using a binary (dummy) variable. The drawback, however, is that it
lowers the degrees of freedom. As a remedy, Auerbach and Gorodnichenko (2012) proposed computing
state probabilities with a logistic function that allows using all observations for the estimations. The
logistic function equals the following:
e(−γzt )
F (zt ) = , (2a)
1 + e(−γzt )
var (zt ) = 1, E(zt ) = 0, (2b)
Auerbach and Gorodnichenko (2012) used the values of the transition function at t − 1 to avoid
contemporaneous feedback from policy actions regarding whether the economy is in a recession or an
expansion. Structural nonlinear impulse responses are estimated using the following:
ˆ R1 (t, h, di ) = B̂h di ,
IR h = 0, . . . , H − 1,
1,R1
ˆ R2 (t, h, di ) = B̂h di ,
IR h = 0, . . . , H − 1,
1,R2
h
where B̂01,R1 = I and B̂01,R2 = I. The coefficient matrices B̂1,R h
and B̂1,R are obtained from the
1 2
following LPs:
yt+h = αh + B1,R
h
(yt−1 · (1 − F (zt−1 )) + . . . + Bhp,R1 yt− p · (1 − F (zt−1 ) +
1
(4)
h
+ . . . + Bhp,R2 yt− p · F (zt−1 ) + uth+h ,
B1,R 2
(yt−1 · F (zt−1 ))
with h = 0, . . . , H − 1. This nonlinear approach has been used by Ahmed and Cassou (2016) to
investigate the effect of consumer confidence on durable goods during periods of economic expansion
and recession.
Besides the easy extension to nonlinear frameworks, another advantage of LPs is their flexible applica-
tion to situations in which an exogenous shock can be identified outside of an SVAR. For example,
Ramey and Zubairy (2018) constructed a military news shock to investigate whether US government
spending multipliers are higher during periods of economic slack or when interest rates are near the
zero lower bound. Once an exogenous shock has been identified, impulse responses can be directly
estimated using OLS regressions:
where αh denotes the regression constant, xt is a vector of control variables, and shock t is the
identified shock variable. The coefficient β h corresponds to the response of y at time t + h to the shock
variable (shock) at time t. The impulse responses are the sequence of all estimated β h . As above, robust
standard errors can be estimated using the approach by Newey and West (1987). If the shock variable
is endogenous, shock t can be estimated using the two-stage least squares (2SLS) regression. In the case
of nonlinearities, the variables can either be multiplied with a dummy variable or with the values of
the transition function in Eq. (3).
Another advantage of LPs is that they can be applied to panel data as well. Estimating impulse
responses based on panel data have been put forward by Auerbach and Gorodnichenko (2013),
Owyang et al. (2013), and Jordà et al. (2015), among others. The general equation for panel data is the
following:
where αi,h denotes (cross-section) fixed effect, xi,t is a vector of control variables, and shock i,t
denotes the identified shock variable. Besides using the absolute values of yt , lpirfs also allows
estimating cumulative impulse responses using (yi,t+h − yi,t−1 ) as the endogenous variable, which is
often done for panel data (see, e.g., Jordà et al., 2015). Similar to the univariate approach, shock t can
also be first estimated by an instrument variable approach (see, e.g., Jordà et al., 2019). It is further
crucial to account for heteroskedasticity and autocorrelation in panel models. The importance of
robust standard errors in the context of corporate finance and asset pricing has been shown by Petersen
(2009).
i.) lp_lin() and lp_nl(), which estimate linear and nonlinear impulse responses based on struc-
tural VARs,
ii.) lp_lin_iv() and lp_nl_iv(), which estimate linear and nonlinear impulse responses for a
shock that has been identified outside of the VAR, and
iii.) lp_lin_panel() and lp_nl_panel(), which estimate linear and nonlinear impulse responses
for panel data.
The functions lp_lin() and lp_nl() estimate linear and nonlinear impulse responses based on
SVARs whose shocks are identified by the Cholesky decomposition. The functions lp_lin_iv() and
lp_nl_iv() allow estimating impulse responses when a shock has been identified outside of the VAR.
The functions lp_lin_panel() and lp_nl_panel() can be used for panel data.
Nonpanel functions rely on several routines written with Rcpp by Eddelbuettel et al. (2011),
making the computations very fast. The functions for panel data are based on the well-established
plm package by Croissant and Millo (2008). Parallel computation, which is optional and available for
all functions, can further reduce the computation time.
Nonpanel functions allow computing ordinary and heteroskedasticity and autocorrelation consis-
tent (HAC) estimators for the impulse responses based on the approach by Newey and West (1987).
By default, lpirfs increases the truncation parameter with the number of horizons h, but a fixed value
can also be manually provided. In addition, pre-whitening is another option that might improve the
confidence interval coverage (Andrews and Monahan, 1992). The user can also apply an information
criterion for each forecast horizon to find the optimal number of lags. The included criteria are
those developed by Akaike (1974), Schwarz (1978), and Hurvich and Tsai (1989). The endogenous,
exogenous, and switching variables must be given separately as a data.frame. Table 1 summarizes
the input options of the nonpanel functions.
Applying lpirfs to panel data works slightly differently than using nonpanel functions due to
the dependency on the plm package. Instead of providing the endogenous and exogenous variables
separately, the user must provide the entire panel data set first, and then give the column names for
the endogenous, exogenous, and other variables. The default is to estimate a fixed-effects model, but
all options available for the plm package are also available within lpirfs. Table 2 summarizes the input
options for the linear and nonlinear panel functions.
Each function output becomes an S3 object, which enables using the generic R functions plot()
and summary(). In addition, the package also contains the functions plot_lin() and plot_nl(), which
enable creating individual graphs of impulse responses.
Function names
The table compares the options for lp_lin(), lp_nl(), lp_lin_iv(), and lp_nl_iv(). The symbol X indicates whether the option,
denoted by the row, is available for the function, denoted by the column. The optional lag length criteria are those by Hurvich and
Tsai (1989), Akaike (1974) and Schwarz (1978).
Function names
The table compares the options for lp_lin_panel() and lp_nl_panel(). The symbol X indicates whether the option, denoted by
the row, is available for the function, denoted by the column. The functions estimate linear and nonlinear impulse responses for
models with panel data.
The following code replicates parts of Figure 5 in Jordà (2005, p. 176). It shows how the output gap,
inflation rate, and federal funds rate react to the corresponding structural shocks. The results are
shown in Figure 1.3 lpirfs follows the convention by Jordà (2005), namely that the first horizon,
denoted on the x-axis, equals h = 0. Applying the generic function summary() to the output returns
a list of several matrices with OLS diagnostics. The first level of the list corresponds to the shock
variable and the second level to the horizon. Table 3 shows OLS diagnostics for the first horizon of the
first shock (output gap).
3 In the appendix, I compare these results with those estimated by a general SVAR.
# Load packages
library(lpirfs)
# Show OLS diagnostics for the first shock of the first horizon
summary(results_lin)[[1]][1]
The example above only estimates impulse responses for the linear case, but Jordà (2005) also
tested for nonlinearities. Although he found no “business-cycle” asymmetries, he identified significant
asymmetries for several lags of both inflation and the federal funds rate. The following code uses
a dummy approach to estimate the nonlinear impulse responses of the variables to a shock in the
federal funds rate. Jordà (2005) used a threshold of 4.75% for the inflation rate, applied to its third
lag. Figure 2 shows the empirical results for the nonlinear example. The results are comparable to the
findings by Jordà (2005), namely that the magnitudes of responses of inflation and output to interest
rates are more responsive in the low-inflation regime (left panel) than in the high-inflation regime
(right panel).
# Create dummy: apply threshold of 4.75 percent to the third lag of the inflation rate
switching_data <- if_else(dplyr::lag(endog_data$Infl, 3) > 4.75, 1, 0)
1.0
0.6
0.9
0.5 0.4
0.6
0.2
0.0 0.3
0.0
0.0
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
0.25 1.00
0.75 0.75
0.00
0.50 0.50
−0.25
0.25
0.25
−0.50
0.00
0.00
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
FF on GDP_gap FF on Infl FF on FF
1.0
0.00
0.25
−0.50 −0.25
0.0
−0.50
−0.75
−0.75 −0.5
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
use_logistic = FALSE)
In this section, I replicate the empirical results by Ramey and Zubairy (2018). The authors, among
others, re-evaluate the findings by Auerbach and Gorodnichenko (2012), who argued that government
spending multipliers are more pronounced during economic recession than during economic expan-
sion. Auerbach and Gorodnichenko (2012) applied a smooth transition VAR (STVAR) to estimate
state-dependent fiscal multipliers. Ramey and Zubairy (2018), however, showed that the estimated
fiscal multipliers are much smaller when the impulse responses are estimated using LPs. The reason is
that the LP approach does not assume that the system remains in a fixed regime once it has entered it.
The following code replicates parts of Figure 12 in the supplementary appendix by Ramey and
Zubairy (2018, p. 35). The results are depicted in Figure 3. It shows how government spending and the
GDP react to a government spending shock in the linear case as well as during periods of economic
expansion and recession. The linear shock is identified according to Blanchard and Perotti (2002). The
absolute values of the figures differ because Ramey and Zubairy (2018) multiplied the log output
response by a conversion factor of 5.6.
FF on GDP_gap FF on GDP_gap
0.5
0.0 0.00
−0.5
−0.25
−1.0
−0.50
−1.5
−0.75
2 4 6 8 10 12 2 4 6 8 10 12
FF on Infl FF on Infl
0.25
0.5
0.00
0.0
−0.25
−0.5
−0.50
−1.0
2 4 6 8 10 12 2 4 6 8 10 12
FF on FF FF on FF
1.0
1.0
0.5
0.5
0.0
0.0
−0.5
−1.0 −0.5
2 4 6 8 10 12 2 4 6 8 10 12
# Endogenous data
endog_data <- ag_data[sample_start:sample_end,3:5]
# Shock variable
shock <- ag_data[sample_start:sample_end, 3]
Using the Jordà-Schularick-Taylor Macrohistory Database, the following example estimates the impulse
responses of the ratio of mortgage lending divided by the GDP to a 1% increase in the short-term
interest rate. Observations during World Wars I and II and observations after 2013 are excluded.4 The
empirical results are shown in Figure 4. An increase in the short-term interest rate leads to a decrease
in the mortgage lending rate, whose effect attenuates after approximately 8 years.
# Load libraries to download and read excel file from the website
library(httr)
library(readxl)
library(dplyr)
4 lpirfs first computes all lags and lags of the first differences of the exogenous data. If the user wants to use a
sub-sample (see example), the observations will be dropped after the lags have been constructed.
1.0
1.5
2
0.5
1.0
0.0
0.5
1
−0.5
0.0
−1.0 0
−0.5
2 4 6 8 10 12 14 16 18 20 2 4 6 8 10 12 14 16 18 20 2 4 6 8 10 12 14 16 18 20
0.0 0.0
−0.25
Figure 3: The figure replicates empirical results of Figure 12 from the supplementary appendix by Ramey and
Zubairy (2018, p. 35). The left column shows the (linear) reaction of government spending (first row) and GDP
(second row) to a government spending shock. The middle column shows the reactions during periods of economic
expansion and the right column during periods of economic slack.
# Remove observations after 2013 and swap the first two columns
jst_data <- jst_data %>%
dplyr::filter(year <= 2013) %>%
dplyr::select(country, year, everything())
# Prepare variables
data_set <- jst_data %>%
mutate(stir = stir) %>%
mutate(mortgdp = 100*(tmort/gdp)) %>%
mutate(hpreal = hpnom/cpi) %>%
group_by(country) %>%
mutate(hpreal = hpreal/hpreal[year==1990][1]) %>%
mutate(lhpreal = log(hpreal)) %>%
# Show irfs
plot(results_panel)
Shock on mortgdp
0.0
−0.2
−0.4
−0.6
2 4 6 8 10
Figure 4: The figure shows the reaction of the ratio of mortgage lending divided by the GDP to a +1% change in
the short-term interest rate.
The following example uses the Hodrick–Prescott filter to decompose the log-GDP time series
for each country to obtain the standardized variable zt for the logistic function in Eq. (2). Figure 5
shows the impulse responses for both regimes. The mortgage lending ratio declines in both regimes,
although it is more pronounced during periods of economic expansion (left panel) than periods of
economic slack (right panel).
# Show irfs
plot(results_panel)
0.0
0.0
−0.3
−0.5
−0.6
−0.9
−1.0
2 4 6 8 10 2 4 6 8 10
Figure 5: The figure shows the reaction of the ratio of mortgage lending divided by the GDP to a +1% change in
the short-term interest rate during periods of economic expansions (left panel) and economic slack (right panel).
Summary
Since the 1980s, impulse response analysis has become a cornerstone in (macro-)econometrics. The
traditional approach of recovering the impulse responses recursively from a (linear) VAR has been
criticized due to some drawbacks, such as the imposed dynamics on the (economic) system, the curse
of dimensionality, and the more difficult application to nonlinear frameworks.
The LPs by Jordà (2005) have become a widely applied alternative to estimate impulse response
functions. This paper introduced lpirfs, an R package that provides a broad framework for estimating
and visualizing impulse response functions using LPs for a variety of data sets. I replicated the
empirical results from the economic literature to prove the validity of the package and to show its
usefulness for future research.
Appendix
This appendix contains a comparison between impulse responses estimated using the vars package
and lpirfs. In addition, I conduct sensitivity analyses regarding the choices of γ in Eq. (2) for the
switching function and different values of λ for the filter by Hodrick and Prescott (1997). The code for
all examples can be found in the vignette of lpirfs.
Plagborg-Møller and Wolf (2019) showed that LPs and VARs compute the same impulse responses
when the lag structure is unrestricted. For empirical studies, this implies that impulse responses that
are estimated by LPs and SVARs are likely to agree at short horizons but differ at longer ones. To
verify this implication, I compare the impulse responses estimated using the lpirfs and vars packages.
The latter relies on the common SVAR approach.
Figure 6 shows the empirical results. The black lines and gray-shaded areas are the same as
in Figure 1, which replicates Figure 5 in Jordà (2005, p. 176). The orange lines and shaded areas
correspond to impulse responses estimated by the vars package (i.e., a standard SVAR). The results
show that impulse responses are similar up to that horizon, which equals the lag length p. For example,
when the lag length p equals 2, the impulse responses and confidence intervals diverge very quickly
(first column). When the lag length p equals 6, however, the impulse responses are much more similar.
This finding coincides with the empirical results by Plagborg-Møller and Wolf (2019), who compared
the dynamic response of corporate bond spreads to a monetary policy shock.
The nonlinear functions in lpirfs allow separating the data into two regimes by either using a dummy
approach or computing state probabilities with the logistic function given in Eq. (2). The logistic
function depends on the parameter γ, which defines how sharply the two regimes are separated.
To investigate how different choices of γ might affect the results, I compare the nonlinear impulse
responses for a shock of the federal funds rate on the output gap.
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
lpirfs vars lpirfs vars lpirfs vars
a.) p = 2 b.) p = 4 c.) p = 6
Figure 6: Comparison of impulse responses estimated by the packages lpirfs and vars. Each column shows the
results for a fixed number of lags (i.e., p = 2, 4, and 6). The shaded areas correspond to the 95% confidence intervals.
Figure 7 shows the empirical results. Each column corresponds to one choice of γ, namely γ = 1, 5,
and 10. I use the output gap as a switching variable and decompose it using the filter by Hodrick and
Prescott (1997). The penalty term λ is set to 1 600 as suggested by Ravn and Uhlig (2002). The first row
of Figure 7 shows the evolution of the transition variable F (zt ), along with NBER-dated recessions.
By construction, a high value of the transition variable corresponds to a low output gap (i.e., periods
of economic slack). Choosing a low value of γ makes the regime-switching smooth, whereas higher
values of γ cause the switching to be quick. The second and third rows show nonlinear impulse
responses for Regimes 1 (economic expansion) and 2 (economic recession). Although the choice of γ
has an effect on the results, it does not change the overall conclusion, namely that no “business-cycle”
effects exist regarding the changes in the federal funds rate, which is in accordance with the findings by
Jordà (2005). At most, the effect would be very shortly negative during periods of economic downturn.
NBER dates and transition variable NBER dates and transition variable NBER dates and transition variable
0.75
0.75 0.75
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
Figure 7: Comparison of nonlinear impulse responses for different values of γ. Each column shows the results
for one parameter value (i.e., γ = 1, 5, and 10). The gray shaded areas in the first row correspond to NBER-dated
recessions. The gray shaded areas in the second and third rows correspond to the 95% confidence intervals of the
impulse responses.
To use the switching function in Eq. (2), one must provide a standardized variable zt . One option is to
decompose a time series into a trend and a cyclical component using the filter by Hodrick and Prescott
(1997) (hereafter the HP-filter). lpirfs includes this option whose routine is written in Rcpp, making
the computation very fast. If applied, the cyclical component of the HP-filter will be standardized
and used for zt . The filter depends on a penalty term λ, which must be given by the user. Ravn and
Uhlig (2002) argued that the parameter should be 6.25 for annual data, 1 600 for quarterly data, and
129 600 for monthly data. To see how different choices of λ influence the nonlinear impulse responses,
I decompose the output gap for three different values of λ and compare the results, which are shown
in Figure 8. The value of γ is fixed to 5. The first row shows the cyclical component of the HP-filter
along with the NBER-dated recessions. A low value in the cyclical component denotes periods of
economic downturn. Note that the results of the second column in Figure 8 are identical to those
in the second column of Figure 7. In contrast to the previous analysis, empirical results do change
significantly, depending on the choice of λ. Thus, it is important to set the penalty term adequately.
NBER dates and cyclical HP component NBER dates and cyclical HP component NBER dates and cyclical HP component
4
1
3
2
0 0
0
−1 −2 −3
−4 −6
1965 1975 1985 1995 1965 1975 1985 1995 1965 1975 1985 1995
−1 −1 −1
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
a) Results for λ = 6.25 b) Results for λ = 1600 c) Results for λ = 129 600
Figure 8: Comparison of nonlinear impulse responses with different values of λ for the filter by Hodrick and
Prescott (1997). Each column shows the results for one parameter value (i.e., λ = 6.25, 1 600, and 129 600). The gray
shaded areas in the first row correspond to NBER-dated recessions. The gray shaded areas in the second and third
rows correspond to the 95% confidence intervals of the impulse responses.
Acknowledgement
I am grateful to the two anonymous reviewers, Philipp Wittenberg, Jon Danielsson, Rainer Schüssler,
Tom Philipp Dybowski, and Detlef Steuer for their helpful comments and suggestions on the paper
and package.
Bibliography
P. Adämmer. lpirfs: Local Projections Impulse Response Functions, 2019. URL https://CRAN.R-project.
org/package=lpirfs. R package version: 0.1.6. [p]
M. I. Ahmed and S. P. Cassou. Does consumer confidence affect durable goods spending during
bad and good economic times equally? Journal of Macroeconomics, 50:86–97, 2016. doi: https:
//doi.org/10.1016/j.jmacro.2016.08.008. [p]
H. Akaike. A new look at the statistical model identification. IEEE transactions on automatic control, 19
(6):716–723, 1974. doi: https://doi.org/10.1109/TAC.1974.1100705. [p]
A. J. Auerbach and Y. Gorodnichenko. Measuring the output responses to fiscal policy. American
Economic Journal: Economic Policy, 4(2):1–27, 2012. doi: https://doi.org/10.1257/pol.4.2.1. [p]
A. J. Auerbach and Y. Gorodnichenko. Output spillovers from fiscal policy. American Economic Review,
103(3):141–46, 2013. doi: https://doi.org/10.1257/aer.103.3.141. [p]
R. Barnichon and C. Brownlees. Impulse response estimation by smooth local projections. Review of
Economics and Statistics, 101(3):522–530, 2019. doi: https://doi.org/10.1162/rest_a_00778. [p]
L. Brugnolini. About local projection impulse response function reliability. CEIS Working Paper, 2018.
URL https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3229218. [p]
Y. Croissant and G. Millo. Panel data econometrics in R: The plm package. Journal of Statistical Software,
27(2):1–43, 2008. doi: https://doi.org/10.18637/jss.v027.i02. [p]
G. Favara and J. Imbs. Credit supply and the price of housing. American Economic Review, 105(3):
958–92, 2015. doi: https://doi.org/10.1257/aer.20121416. [p]
J. Garín, R. Lester, and E. Sims. Are supply shocks contractionary at the zlb? evidence from utilization-
adjusted tfp data. Review of Economics and Statistics, 101(1):160–175, 2019. doi: https://doi.org/10.
1162/rest_a_00723. [p]
J. D. Hamilton. Nonlinearities and the macroeconomic effects of oil prices. Macroeconomic Dynamics,
15(S3):364–378, 2011. doi: https://doi.org/10.1017/S1365100511000307. [p]
C. M. Hurvich and C.-L. Tsai. Regression and time series model selection in small samples. Biometrika,
76(2):297–307, 1989. doi: https://doi.org/10.1093/biomet/76.2.297. [p]
Ò. Jordà. Estimation and inference of impulse responses by local projections. American Economic
Review, 95(1):161–182, 2005. doi: https://doi.org/10.1257/0002828053828518. [p]
Ò. Jordà and A. M. Taylor. The time for austerity: estimating the average treatment effect of fiscal
policy. The Economic Journal, 126(590):219–255, 2016. doi: https://doi.org/10.1111/ecoj.12332. [p]
Ò. Jordà, M. Schularick, and A. M. Taylor. Betting the house. Journal of International Economics, 96:
S2–S18, 2015. doi: https://doi.org/10.1016/j.jinteco.2014.12.011. [p]
Ò. Jordà, M. Schularick, and A. M. Taylor. The effects of quasi-random monetary experiments. Journal
of Monetary Economics, In press, 2019. doi: https://doi.org/10.1016/j.jmoneco.2019.01.021. [p]
J. Keating. Structural approaches to vector autoregressions. Federal Reserve Bank of St. Louis Review, 74
(September/October), 1992. URL https://files.stlouisfed.org/files/htdocs/publications/
review/92/09/Vector_Sep_Oct1992.pdf. [p]
L. Kilian and Y. J. Kim. How reliable are local projection estimators of impulse responses? Review of
Economics and Statistics, 93(4):1460–1466, 2011. doi: https://doi.org/10.1162/REST_a_00143. [p]
W. K. Newey and K. D. West. Hypothesis testing with efficient method of moments estimation.
International Economic Review, pages 777–787, 1987. doi: https://doi.org/10.2307/2526578. [p]
M. T. Owyang, V. A. Ramey, and S. Zubairy. Are government spending multipliers greater during
periods of slack? evidence from twentieth-century historical data. American Economic Review, 103(3):
129–134, 2013. doi: https://doi.org/10.1257/aer.103.3.129. [p]
M. A. Petersen. Estimating standard errors in finance panel data sets: Comparing approaches. The
Review of Financial Studies, 22(1):435–480, 2009. doi: https://doi.org/10.1093/rfs/hhn053. [p]
B. Pfaff. VAR, SVAR and SVEC models: Implementation Within R Package vars. Journal of Statistical
Software, 27(4), 2008. doi: https://doi.org/10.18637/jss.v027.i04. [p]
M. Plagborg-Møller and C. K. Wolf. Local projections and vars estimate the same impulse responses.
Unpublished paper: Department of Economics, Princeton University, 2019. URL https://scholar.
princeton.edu/sites/default/files/mikkelpm/files/lp_var.pdf. [p]
V. A. Ramey and S. Zubairy. Government spending multipliers in good times and in bad: evidence
from us historical data. Journal of Political Economy, 126(2):850–901, 2018. doi: https://doi.org/10.
1086/696277. [p]
M. O. Ravn and H. Uhlig. On adjusting the hodrick-prescott filter for the frequency of obser-
vations. Review of Economics and Statistics, 84(2):371–376, 2002. doi: https://doi.org/10.1162/
003465302317411604. [p]
G. Schwarz. Estimating the dimension of a model. The Annals of Statistics, 6(2):461–464, 1978. doi:
https://doi.org/10.1214/aos/1176344136. [p]
C. A. Sims. Macroeconomics and reality. Econometrica: Journal of the Econometric Society, pages 1–48,
1980. doi: https://doi.org/10.2307/1912017. [p]
E. T. Swanson. Measuring the effects of federal reserve forward guidance and asset purchases on
financial markets. Technical report, National Bureau of Economic Research, 2017. URL https:
//www.nber.org/papers/w23311. [p]
S. Tenreyro and G. Thwaites. Pushing on a string: Us monetary policy is less powerful in recessions.
American Economic Journal: Macroeconomics, 8(4):43–74, 2016. doi: https://doi.org/10.1257/mac.
20150016. [p]
Philipp Adämmer
Department of Mathematics and Statistics
Helmut Schmidt University
Hamburg, Germany
(ORCiD: 0000-0003-3770-0097)
[email protected]