This book is in Open Review. We want your feedback to make the book better for you and other students. You may annotate some text by selecting it with the cursor and then click "Annotate" in the pop-up menu. You can also see the annotations of others: click the arrow in the upper right hand corner of the page

15 Estimation of Dynamic Causal Effects

It sometimes is of interest to know the size of current and future reaction of \(Y\) to a change in \(X\). This is called the dynamic causal effect on \(Y\) of a change in \(X\). In this Chapter we discuss how to estimate dynamic causal effects in R applications, where we investigate the dynamic effect of cold weather in Florida on the price of orange juice concentrate.

The discussion covers:

  • estimation of distributed lag models,
  • heteroskedasticity- and autocorrelation-consistent (HAC) standard errors,
  • generalized least squares (GLS) estimation of ADL models.

To reproduce code examples, install the R packages listed below beforehand and make sure that the subsequent code chunk executes without any errors.

library(AER)
library(quantmod)
library(dynlm)
library(orcutt)
library(nlme)
library(stargazer)

References

Hlavac, Marek. 2022. Stargazer: Well-Formatted Regression and Summary Statistics Tables. Bratislava, Slovakia: Social Policy Institute. https://CRAN.R-project.org/package=stargazer.
Kleiber, Christian, and Achim Zeileis. 2008. Applied Econometrics with R. New York: Springer-Verlag. https://CRAN.R-project.org/package=AER.
Pinheiro, José, Douglas Bates, and R Core Team. 2023. nlme: Linear and Nonlinear Mixed Effects Models (version 3.1-162). https://svn.r-project.org/R-packages/trunk/nlme/.
Ryan, Jeffrey A., and Joshua M. Ulrich. 2023. quantmod: Quantitative Financial Modelling Framework (version 0.4.25). http://www.quantmod.com.
Stefano, Spada, Matteo Quartagno, Marco Tamburini, and David Robinson. 2018. orcutt: Estimate Procedure in Case of First Order Autocorrelation. https://CRAN.R-project.org/package=orcutt.
Zeileis, Achim. 2019. dynlm: Dynamic Linear Regression. https://CRAN.R-project.org/package=dynlm.