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

The package cannot use this data. Treatment adoption is not simultaneous. #125

Open
Machine855 opened this issue May 21, 2024 · 4 comments

Comments

@Machine855
Copy link

Machine855 commented May 21, 2024

Dear all:

I run the following code in R to test whether your synth function does work on my panel dataset:

library(haven)
testen <- read_dta("test files/testen.dta")
View(testen)
library(dplyr)
setup = panel.matrices(as.data.frame(as_tibble(testen)))

I got the following error message:

library(haven)
testen <- read_dta("test files/testen.dta")
View(testen)
library(dplyr)
setup = panel.matrices(as.data.frame(as_tibble(testen)))
Error in panel.matrices(as.data.frame(as_tibble(testen))) :
The package cannot use this data. Treatment adoption is not simultaneous.
In addition: There were 50 or more warnings (use warnings() to see the first 50)

Any help to solve this issue is greatly appreciated. Is this package also available for staggered treatments?

@davidahirshberg
Copy link
Collaborator

The current version of the package does not handle staggered treatments automatically. But it's fairly easy to make a few
calls to synthdid_estimate to to implement your own approach to staggered adoption. See Section 8 of the synthetic diff-in-diff paper.

In this we are a bit behind the Stata, Julia, and Python packages, which do automate a version of what is described in Section 8.

@Machine855
Copy link
Author

Thank you so much for your reply. Can you please change the STATA code so you can run it in Parallel? Parallel execution -> parallel(#) partial out variables in # separate Stata processes, speeding up execution depending on data size and computer characteristics. Requires the parallel package.

@davidahirshberg
Copy link
Collaborator

davidahirshberg commented Jun 7, 2024 via email

@Machine855
Copy link
Author

Machine855 commented Jun 22, 2024

I am unfortunately unable to program in R. Could you please implement it in R?

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