A Stata command to compute long-run effects after estimating a dynamic model.
lreff computes the long-run effect for each variable specified after estimating a dynamic model
using Stata's time series operators (e.g., L.). The command assumes that an autoregressive distributed
lag (ARDL) model is estimated. To compute the long-run effect after estimating an error-correction model
(ECM), the user should specify the ecm option. Standard errors are estimated using the delta method
by collecting the coefficients and passing
them to Stata's nlcom command.
lreff varlist(min=1) [, ecm]
ecm specifies that an ECM is estimated.
lreff can be used when the most recent estimated model is a dynamic model that uses Stata's time series
operators (e.g., L.). In terms of panel data, it only works with homogeneous panel estimators. The estimates are
incorrect after mean group estimation.
lreff is confirmed to work with the following programs:
regxtreg, fextabondxtdpdxtdpdsysxtdpdbcxtdpdgmmxtdpdml1xtdpdqmlxtivregxtivdfreg(pooled coefficients only)xtdcce2(pooled coefficients only)
lreff works after time series and panel commands. The examples below are based on a U.S. state-level dataset found here.
xtreg ARDL(1,1) example:
xtreg L(0/1).(lnff lny lnpop) i.year, fe r
lreff lny lnpop
xtreg ECM(1,1) example:
xtreg d.lnff l.lnff d.lny l.lny d.lnpop l.lnpop i.year, fe r
lreff lny lnpop, ecm
reg ARDL(2,1,0) example:
reg L(0/2).(lnff) L(0/1).(lny) lnpop if state=="Ohio"
lreff lny lnpop
The results are stored in r(results), which can be displayed with matlist r(results).
lreff can be installed by typing the following in Stata:
net install lreff, from("https://raw.githubusercontent.com/rthombs/lreff/main") replace
Ryan P. Thombs
(Boston College)
Contact Me: thombs@bc.edu
Footnotes
-
The coefficients are stored by time period in e(b) after using
xtdpdmland are reported as var(t) for contemporaneous coefficients and var(t-lag) for the lags.lreffcomputes the long-run effects using the first time period and reports the coefficients based on their names stored in e(b). Theecmoption is not compatible withxtdpdml. ↩