Skip to content

Unable to replicate did output using staggered #13

@fschoner

Description

@fschoner

I get an error when trying to replicate results obtained from the did package using the staggered_cs command. More specifically,

sg_attgt <- att_gt(
     yname = outcomes[[1]], gname = "first_treat", idname = "pid",
     tname = "Enrolment", control_group = "notyettreated", panel = FALSE,
     xformla = ~ 1, data = df_reg, est_method = "dr", 
     bstrap = TRUE, cband = TRUE
  )

runs through smoothly whereas

staggered_cs(
  df_reg,
  i = "pid,
  t = "Enrolment",
  g = "first_treat",
  y = outcomes[[1]],
  estimand = "simple"
)

throws the following error.

Error in `dplyr::filter()`:
! Problem while computing `..1 = t >= g`.
Caused by error in `t >= g`:
! comparison (>=) is possible only for atomic and list types

Any ideas?

Unfortunately, I cannot share the data. I can try to provide a reproducible example next week if that's helpful. Let me know please.

Have a nice weekend!

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