Skip to content

Parametric fails with weights + method="gsynth" in fect: dimension mismatch in att.avg.W.boot assignment #73

@DezhenGuo0713

Description

@DezhenGuo0713

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"
)

with error:

Error in att.avg.W.boot[, j] <- boot$att.avg.W :
number of items to replace is not a multiple of replacement length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions