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

Erroneously dropping variables owing to inexact variable name match #204

Closed
Constantino-Carreto-Romero opened this issue May 14, 2024 · 4 comments · Fixed by #209
Closed
Assignees
Labels
bug Something isn't working

Comments

@Constantino-Carreto-Romero
Copy link
Collaborator

Per comment: #203 (comment)

Check the following example

use example31, clear 
xtevent y eta, panelvar(i) timevar(t) pol(z) impute(stag) window(3) savek(aa)
rename aa_evtime aa_evtime_myvar
xtevent y eta, panelvar(i) timevar(t) pol(z) impute(stag) window(3) savek(aa, replace)

the variable aa_evtime_myvar was erroneously dropped.
In general, we should check all the inexact variable matches done with unab.

@jorpppp
Copy link
Collaborator

jorpppp commented May 15, 2024

@Constantino-Carreto-Romero Make sure to merge from main here before adding extra commits here since we just closed #203 and #206

@Constantino-Carreto-Romero
Copy link
Collaborator Author

@jorpppp
in 3596450 I implemented an exact check of the event-time dummies, event-time variable, trend variable, and interaction variables, so if required, the program drops only the variables that exactly match specific names.
in 9d5bb89 I uploaded a do-file with examples to test the implementation. I also ran the test file without inconvenience.

@jorpppp
Copy link
Collaborator

jorpppp commented May 16, 2024

Looks good, thanks @Constantino-Carreto-Romero. I'll start a PR.

@jorpppp
Copy link
Collaborator

jorpppp commented May 16, 2024

Summary: In this issue we fixed a bug where some variables were being dropped due to inexact variable name matches.

Thread continues in #209

@jorpppp jorpppp linked a pull request May 16, 2024 that will close this issue
jorpppp added a commit that referenced this issue May 16, 2024
jorpppp added a commit that referenced this issue May 16, 2024
* #204 check for the name of the imputed policyvar

* #204 bring changes from main

* #204 bring changes from main

* #204 exact check of variables to drop

* #204 examples to test implementation

* #204 #209 Delete issue folder

---------

Co-authored-by: Constantino Carreto Romero <carretoromeroc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants