You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having a bit of trouble with your package. For clarity, I am trying to check the impact of South Africa's entrance into BRIC(S) in 2010 on several outcomes. The data I have is as follows (the complete data is in the attached file): Dataset
> synthetic_out_gdp_per_capita %>% plot_trends()
Error in `dplyr::filter()`:
ℹ In argument: `time_unit %in% time_window`.
Caused by error in `time_unit %in% time_window`:
! object 'time_unit' not found
Run `rlang::last_trace()` to see where the error occurred.
> synthetic_out_gdp_per_capita %>% plot_differences()
Error in `dplyr::mutate()`:
ℹ In argument: `diff = real_y - synth_y`.
Caused by error:
! object 'real_y' not found
Run `rlang::last_trace()` to see where the error occurred.
> synthetic_out_gdp_per_capita %>% plot_weights()
Error in `dplyr::rename()`:
! Can't rename columns that don't exist.
✖ Column `variable` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.
> synthetic_out_gdp_per_capita %>% plot_placebos()
Error in `dplyr::filter()`:
ℹ In argument: `sqrt(pre_mspe) <= thres * 2`.
Caused by error:
! `..1` must be of size 19 or 1, not size 0.
Run `rlang::last_trace()` to see where the error occurred.
> synthetic_out_gdp_per_capita %>% plot_mspe_ratio()
(works, but outputs a figure with only "Donor" category, also uploaded as file in the issue)
> synthetic_out_gdp_per_capita %>% grab_balance_table()
Error in `tidyr::gather()`:
! Can't subset columns that don't exist.
✖ Column `variable` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.
> synthetic_out_gdp_per_capita %>% grab_significance()
(works, but I can see on the table that South Africa is being treated as donor and there are no treated)
The errors seem to be related to the masking of dplyr functions and some other problem that's keeping South Africa from being properly recognized as treated.
What do you think? I'd appreciate some help here.
Thank you very much.
Congratz on the great package!
Kind regards,
Pedro Cunha
The text was updated successfully, but these errors were encountered:
Hi @PedroMilreuCunha! My goodness! So sorry for the delayed response. I'm sure you've already figured this out by now, but just for anyone in the future that comes across this issue post and is running into a similar issue.
The problem with your third variation/example has to do with the argument you're supplying to unit = . In that example, you're supplying country_code rather than country_name. There is no "South Africa" in your data for the country_code variable. So either you need to change your unit to country_name as you do in your other examples, or you need to supply the correct intervention unit name to the i_unit = argument, which in this case would be i_unit = "ZAF".
Admittedly, the fact that tooling doesn't throw you an error that lets you know that you've made that mistake is not useful. The errors that do emerge is when we're referencing variables that don't exist yet. This is a good shout out that better error messaging needs to be incorporated into the existing version of the package to make these kinds of mistakes easier to identify and correct.
Hello!
I am having a bit of trouble with your package. For clarity, I am trying to check the impact of South Africa's entrance into BRIC(S) in 2010 on several outcomes. The data I have is as follows (the complete data is in the attached file):
Dataset
When I run the code for the effects on exports and imports (below), it works normally:
As I mentioned, this code works just fine. However, once I move on to any of the other variables, such as
gdp_per_capita
, using the same code:I get the errors:
The errors seem to be related to the masking of dplyr functions and some other problem that's keeping South Africa from being properly recognized as treated.
What do you think? I'd appreciate some help here.
Thank you very much.
Congratz on the great package!
Kind regards,
Pedro Cunha
The text was updated successfully, but these errors were encountered: