When using fect() with method="gsynth", parametric standard errors fail if weights are supplied. The error appears during bootstrap aggregation:
library(panelView)
library(fect)
data(fect)
simgsynth$Cweights <- 1
out <- fect(
Y ~ D + X1 + X2,
data = simgsynth,
index = c("id","time"),
method = "gsynth",
force = "two-way",
CV = TRUE,
r = c(0,5),
se = TRUE,
nboots = 1000,
vartype = "parametric",
parallel = FALSE,
W = "Cweights"
)
Error in att.avg.W.boot[, j] <- boot$att.avg.W :
number of items to replace is not a multiple of replacement length