Closed yurikotk closed 5 years ago
Hi Yuriko,
Sorry for the delay. We are currently developing a greatly reworked version of PanelMatch. There are still parts of this new code that are unfinished and/or need some cleaning up, but I believe the functionality you need should be implemented.
If you're open to it, it would be hugely helpful if you could try the problem on the new version. The bugs might be fixed in the new version and if not, it will still be incredibly helpful to identify bugs in the code that is under development. If that works for you, I can help get you set up using the new code.
-Adam
Hi Adam,
Thank you so much for your reply and offer to help. Please let me clarify the version you mentioned. I wonder whether the "new" version you referred to is the one you are currently working on or the version updated a month ago.
I got the reported problem when I implemented the argument on PanelMatch which I installed in September. Today I installed the current version and, with this, got the following error message.
Error in bindrows(x, .id) : Argument 81 must be length 20, not 1
I guess you are referring to the new version on which you are working on, and am very much interested in trying the problem on that version. Thank you again for your help.
-Yuriko
I apologize -- the new version is actually in the "development" branch. You can install it with install_github("insongkim/PanelMatch", ref = "development")
The interface is quite different from the previous version and the documentation isn't quite finished, so I apologize for that. For my own understanding, it looks like you're interested in seeing the treatment effect of "alter" on "ben_ratio" and you want to include the variables: "poverty", "povsq", "voteshare", "votesharechange", "mayor" in the refinement calculations, right? Do you want to lag those variables?
Thanks so much for the helpful suggestion on the "new" version, Adam. I really appreciate it. Now I am clear about it, and will try.
Yes, I would like to estimate the treatment effect of "alter" on "ben_ratio," and lag those 5 variables.
thanks for your patience. I would suggest trying the following PanelMatch call. (PanelMatch has been temporarily renamed to PanelMatch2):
PanelMatch2(3, "year", "code", "alter", "ben_ratio", refinement.method = "CBPS.weight", data = panel2, match.missing = T, covs.formula = ~ poverty + povsq + voteshare + votesharechange + mayor + lag("ben_ratio", 1:3) + lag("alter", 1:3) + lag("poverty", 1:3) + lag("povsq", 1:3) lag("voteshare", 1:3) + lag("votesharechange", 1:3) + lag("mayor", 1:3), size.match = 5)
Thank you so much for the code. I will try them with PanelMatch2, and report to you later regarding the results.
@adamrauh Hi
I would greatly appreciate if you could answer this question: https://stats.stackexchange.com/questions/388968/how-to-do-psm-with-panel-data-using-panelmatch Thanks in advance. Best regards,
@shahlaebrahimi I'm going to create a new issue thread for this
Dear authors,
When I try to identify matched sets by including "covers.lagged," the following error message always appears. This problem does nor occur if I simply use covariates with current values. In my argument, I try to estimate the average treatment effect of alternation of power (alter) on the level of social spending (ben_ratio).
Please see my below my codes and the error message. I would appreciate it if you could give me any instruction to solve the problem. Thank you so much.
Best, Yuriko Takahashi
matches.cbps <- PanelMatch(lag=3, max.lead = 3, time.id = "year", unit.id = "code", treatment="alter", formula =ben_ratio~alter, covars.lagged = c("poverty", "povsq", "voteshare", "votesharechange", "mayor"), method="CBPS", weighting = FALSE, qoi = "att", M = "5", data=panel2)