I want to estimate a dynamic panel model with firm level time invariant fixed effects and time-varying regional fixed effects. I'm trying to implement this with R package
plm, but I run into trouble when I try to include that time-varying regional fixed effects. Here's what I've done:
df <- plm.data(df, index = c("firm", "year") fit <- pgmm(formula = y ~ lag(y, 1) + lag(X, 0:1) + region:year | lag(y, 2:99) + lag(X, 2:99), data = df, effect = "individual", model = "twosteps", transformation = "ld")
The system becomes singular and does not solve. I can fix that by replacing
region, but that's not what I want to do. So it seems that regional fixed effects can't be time varying for some reason. Is this intended to be so or is there some workaround available? If R cannot handle this, is there some other program that can?