Support #481
closedShould household identifier match (for most respondents) across waves?
100%
Description
Do household identifiers (b_hidp, and c_hidp) match across waves (for respondents who do not move home)?
I've created one consolidated data frame with all individuals who completed wave b and wave c. Thus all remaining individuals in my data frame have a b_hidp and a c_hidp. However, in all cases, these IDs do not match.
I've tested and re-run my code, and am satisfied that individual waves have merged correctly on pidp so each individual respondent has not been joined to another erroneously. This leaves me unsure if I've made a mistake, or if the household identifiers are not supposed to match up.
Clearly, people who move home will not have the same identifier, but no cases match. Below is a snippet of the error from the test comparing b_hidp and c_hidp:
Error: Test failed: 'Household IDs for recurrent respondents match' * Not expected: us$b_hidp not equal to us$c_hidp 44178/44178 mismatches (average diff: 5903312). First 10: pos x y diff 1 68013602 68013604 -2 2 68020402 68020404 -2 3 68027202 68040804 -13602 4 68034002 68047604 -13602 5 68047602 68068004 -20402 6 68054402 68074804 -20402 7 68068002 68088404 -20402 8 68115602 68149604 -34002 9 68136002 68170004 -34002 10 68156402 68190404 -34002.
And a section of the dataframe I've constructed with the relevant variables:
id b_hidp c_hidp (int) (int) (int) 1 68004087 68013602 68013604 2 68006127 68020402 68020404 3 68006807 68027202 68040804 4 68007487 68034002 68047604 5 68008847 68047602 68068004 6 68009527 68054402 68074804
Is this what you would expect given how the household identifier is constructed?
Thank you.