bcallaway11 / did

Difference in Differences with Multiple Periods, website: https://bcallaway11.github.io/did
287 stars 91 forks source link

Error Message when using att_gt(): lapply(X = unname(split(e, grp)), FUN = FUN, ...) : invalid formal argument list for "function" #194

Open 49470952 opened 2 months ago

49470952 commented 2 months ago

Hi, I ran into an error message from using did package, att_gt(). My code set up is as below:
out<-did::att_gt(yname="value", tname="month", idname="eci", gname="first.treated",

xformla=~matchto,

        data=dat3,
        control_group=c("nevertreated","notyettreated"),
        est_method = reg)

Error in lapply(X = unname(split(e, grp)), FUN = FUN, ...) : invalid formal argument list for "function"

this R code worked for a couple of times, but for some reason, it started to give me an error message now. I am not sure what caused this error (would it be caused by a specific did version?). Please can someone help me with this issue? Thank you very much in advance.

pedrohcgs commented 2 months ago

We cant really help without a reproducible example that we can run bybour own.

Thanks


Pedro H. C. Sant'Anna https://psantanna.com https://psantanna.com


Warning: This email may contain confidential or privileged information intended only for the use of the individual or entity to whom it is addressed. If you are not the intended recipient, please understand that any disclosure, copying, distribution, or use of the contents of this email is strictly prohibited.

On Sun, Apr 14, 2024 at 22:10 49470952 @.***> wrote:

Hi, I ran into an error message from using did package, att_gt(). My code set up is as below: out<-did::att_gt(yname="value", tname="month", idname="eci", gname="first.treated",

xformla=~matchto,

data=dat3, control_group=c("nevertreated","notyettreated"), est_method = reg)

Error in lapply(X = unname(split(e, grp)), FUN = FUN, ...) : invalid formal argument list for "function"

this R code worked for a couple of times, but for some reason, it started to give me an error message now. I am not sure what caused this error (would it be caused by a specific did version?). Please can someone help me with this issue? Thank you very much in advance.

— Reply to this email directly, view it on GitHub https://github.com/bcallaway11/did/issues/194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE73476UWJHUK5DWOIPV3LY5MZJTAVCNFSM6AAAAABGGOC6HWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DENJVGI3TMNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

49470952 commented 2 months ago

sample.xlsx

Thanks for reply, above is the subset of the dataset I use. Also, I used below code to install 'did' package:

devtools::install_github("bcallaway11/did") library(did)

Please let me know if you have any thoughts on solving this issue. Thank you very much.