Closed grantmcdermott closed 1 year ago
Yeah, I updated those functions but forgot to update the corresponding documentation.
Those functions are mostly internal and used for testing, but I'll get this fixed, as soon as possible.
Thanks @bcallaway11.
https://bcallaway11.github.io/did/articles/did-basics.html is updated now and everything should work.
I tried the updated code and got an error message:
> # set seed so everything is reproducible
> set.seed(1814)
>
> # generate dataset with 4 time periods
> time.periods <- 4
>
> # add dynamic effects
> sp$te.e <- 1:time.periods
Error in sp$te.e <- 1:time.periods : object 'sp' not found
>
> # generate data set with these parameters
> # here, we dropped all units who are treated in time period 1 as they do not help us recover ATT(g,t)'s.
> dta <- build_sim_dataset(sp)
Error in build_sim_dataset(sp) : object 'sp' not found
Ah yes, there is still an issue (not sure how I has able to get this to run). I think that you need to add a line like:
sp <- reset.sim(time.periods=time.periods)
immediately after the fourth line.
I’m just on my IPad here at the moment, but I’ll confirm that works as soon as possible.
It works fine for me now.
Hi guys.
Hopefully I'm not doing something dumb here. But I'm unable to follow along with the example from the intro vignette.
Created on 2022-03-24 by the reprex package (v2.0.1)
The
build_sim_dataset
documentation is a little unclear to me. But I think thesplist
argument object is supposed to be defined prior to calling the function (through the secondaryreset.sim()
function?) It might just be the case that that you're missing the environment scope for user defined values, or things aren't getting passed through...
correctly.Thanks.
PS It kind of works if I define a intermediate object using
reset.sim
. But I don't get the same values as the intro vignette (different row numbers for starters.)Created on 2022-03-24 by the reprex package (v2.0.1)
Session info: