Dynamic panel data models in Julia

Hello!
Does anyone know whether any packages implement dynamic panel data models, like xtabond would in Stata?
Thank you!

The FixedEffectsModels.jl package will let you estimate models using instrumental variables. I have used it to estimate models from Arellano-Bond.

Thank you @mcreel how would I instruct the FixedEffectModels package so that they implement the GMM estimator?

I would like to implement a model like so

y_{it} = \alpha y_{it-1} + x_{it} \beta + \eta_{i} + \varepsilon_{it}

and estimate it using AB’s GMM methodology. My data look like

where Country and Year are individual and time indices.

What formula would implement AB if I want to use lagged values of EVCentrality as an instrument (here L1 and L2 for lag 1 and lag 2, respectively)?

I was thinking of something along those lines:
reg(formal,@formula(EVCentrality ~ (L1 ~ L2) + fe(Country)))

Perhaps to make this answer even more useful for people other than myself (time permitting), it would be good to have a Julia implementation of the example from Section 6.1 from here.

That is reconstruct the formula (in R) and then it could even go into the documentation.

This is the R code I would like to translate:

data(EmplUK, package = "plm")
dat <- EmplUK
dat[,c(4:7)] <- log(dat[,c(4:7)])
names(dat[,c(4:7)]) <- c("n", "w", "k", "ys")
m1 <- pdynmc(dat = dat, varname.i = "firm", varname.t = "year",
use.mc.diff = TRUE, use.mc.lev = FALSE, use.mc.nonlin = FALSE,
include.y = TRUE, varname.y = "emp", lagTerms.y = 2,
fur.con = TRUE, fur.con.diff = TRUE, fur.con.lev = FALSE,
varname.reg.fur = c("wage", "capital", "output"),
lagTerms.reg.fur = c(1,2,2),
include.dum = TRUE, dum.diff = TRUE, dum.lev = FALSE, varname.dum = "year",
w.mat = "iid.err", std.err = "corrected",
estimation = "onestep", opt.meth = "none")

Some code which estimates a similar model is here: Econometrics/PracticalSummaries/20-PanelData.jl at main · mcreel/Econometrics · GitHub

This sets up regressors and instruments. The results very similar but not identical to what I get from the GRETL package. I think that the differing treatment of missings accounts for this, as well as the way covariances are estimated, perhaps. I haven’t gone into it in detail, though. So, please treat this as a starting point, but perhaps with some corrections/improvements needed.