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

Panel id NA in ifelse #59

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Panel id NA in ifelse #59

wants to merge 7 commits into from

Conversation

lauratregadas
Copy link
Contributor

@lauratregadas lauratregadas commented May 23, 2024

Adds NA check so as to no throw warnings when paste0 on panel number and id.

Tested and working.

@lauratregadas
Copy link
Contributor Author

The basic identification had been using V1023, which reports to area type (capital, rest of the metropolitan region, etc.). that is useless to identify individuals within a household. After checking out the Stata code, I realised the correct variable to use here would be V2003, which order number within the household. V2003 is also used in the advanced identification. This mistake was probably why we were getting worse results with the advanced identification than with the basic one - the latter was less strict than we expected. I am unsure, however, if including V2003 in .by arguments will be enough to solve the problem, as Stata does something more complex with it

@lauratregadas
Copy link
Contributor Author

lauratregadas commented Sep 2, 2024

The current solution paste0(V1014, id) does not work because individual 23 from panel 1 will have the same id as individual 3 from panel 12. Using as.hexmode was suggested. It should work until panel 16 is created. Then, we will need to come up with a new solution. I tried implementing it and ran tests on panel 2. % found went from 60%ish in interview 5 to 55%ish. Worse than that, the % found now grows as interviews progress, which makes no sense. Therefore, I am reversing the last commit
image

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

Successfully merging this pull request may close these issues.

1 participant