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
Invalid dimensions (0, 1). error #3
Comments
Hey @TheDataCoder, Having a single covariate shouldn't be an issue. I just ran german_reunification.py but with only one covariate, such that The problem might be caused by the pip-installable version of the package being a little outdated. I just pushed the latest version of SyntheticControlMethods to pypi so try If that doesn't solve the issue, could you please send me your entire stack trace so that I can get a better understanding of what exactly is causing the problem? If you are ok with it, sending the dataset so that I can run your code would also be helpful. |
I've tried reinstalling it in the new environment, but still got the same result. I can send you the dataset, and if it works fine on your side I'll send you the stack trace. Should I send you an email? |
Alright, I'll try to run on my machine. Preferably attach the dataset to this thread, but if you prefer, send it to me personally in an email. |
I've attached the file, please check if it works fine on your side. |
Hey @TheDataCoder, The issue is that you only have a treated unit in your dataset, i.e. you don't have any control units. The synthetic control method attempts to find a weighted average of control units that resembles the treated unit, this does not work if there are no control units in the dataset. For clarity, your dataset looks like this:
The problem is that all rows have value 1 in the column "group". If you are looking for some more resources on how the Synthetic Control method works here are some tips:
|
Thank you, it finally worked! I initially though that groups for reference would be synthetically generated using the moving window. I remember reading about that concept and thought it was realized here. |
Hello, thank you for your great effort!
I've got one year of daily observations for my data. There is only single co-variate and when I try to do
I get Invalid dimensions (0, 1) error. Is there a problem with my understanding of the method?
The text was updated successfully, but these errors were encountered: