Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estimates are not invariant to sort order #54

Closed
davidnathanlang opened this issue Aug 9, 2021 · 1 comment
Closed

Estimates are not invariant to sort order #54

davidnathanlang opened this issue Aug 9, 2021 · 1 comment

Comments

@davidnathanlang
Copy link

davidnathanlang commented Aug 9, 2021

Running the example code generates distinct results based on the way the data is fed into the augsynth. It generates point estimates that are pretty different. Here's an example using the code from your vignette.

library(augsynth)
library(dplyr)
data(kansas)
(
syn1 <- augsynth(lngdpcapita ~ treated, fips, year_qtr,   # Vignette Example  Estimate -0.029
                 kansas,
                 progfunc = "None", scm = T)
)
(syn2 <- augsynth(lngdpcapita ~ treated, fips, year_qtr,  #Descending Estimate -0.008
                 kansas %>% arrange(fips,desc(year_qtr)),
                 progfunc = "None", scm = T)
)

@ebenmichael
Copy link
Owner

Thanks for catching this! In this case there was a bug in how the function was picking the treatment time when it wasn't provided by the user. It should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants