I have time-series cross-sectional data with missing data. I have imputed the data with Amelia, but I encounter two error when I try to run my fixed effect regressions. First, if I do not specify the data argument in plm or fixest, R returns I get an error.
Second, if I specify the data argument and move to the next line where I use mi.combine(fits), R returns Error in mi.combine(): ! analysis model does not have tidy() method.
MRE:
library(Amelia)
library(clarify)
library(fixest)
library(plm)
# Load dataset
data("africa", package = "Amelia")
# Multiple imputation
a.out <- amelia(x = africa, m = 10, cs = "country",
ts = "year", logs = "gdp_pc", p2s = 0)
# Run fixed effects regression
fits <- with(a.out, plm(gdp_pc ~ infl * trade))
fits <- with(a.out, feols(gdp_pc ~ infl * trade, data = a.out))
mi.combine(fits)