Hello Members,

I would like to seek your help on problem encountered in attempting to merge file containing variables for the same a unit of observation (household).

I am trying to use household ID (hh) and other household identifiers (ae, astrata, type) which together should allow to identifying a household uniquely. As shown below the variables are described the same across the two files but have different no. observations, so cannot be matched one-to-one basis to merge files.

Could you suggest any trick to overcome the problem?

Thanks,
Mohamud

FILE 1

Code:
 
strata byte %8.0g strata_id
strata_id
ea int %8.0g EA ID
block byte %8.0g Block ID
hh byte %8.0g Household ID
type byte %8.0g type_hh Urban/Rural/IDP or Nomad
astrata byte %8.0g lastrata Analytical strata
weight float %9.0g Household weight
hhh_edu byte %8.0g edu_level_broad
Education Level of Household Head
hhh_age byte %8.0g Age of Household Head
hhh_gender byte %8.0g hhm_gender
Gender of Household Head
. sum strata ea block hh type astrata weight hhh_edu hhh_age hhh_gender
Variable Obs Mean Std. Dev. Min Max
strata 6,092 34.24606 14.62617 1 57
ea 6,092 209.0635 114.3199 1 413
block 6,092 31.29711 8.778698 1 69
hh 6,092 9.810407 8.249635 1 60
type 6,092 1.584865 .9465371 1 4
astrata 6,092 7.245732 4.145188 1 15
weight 6,092 318.3864 656.6932 .1215384 10705.87
hhh_edu 4,279 1.332554 1.987206 0 6
hhh_age 6,091 37.79182 11.93012 16 90
hhh_gender 6,092 .5041037 .5000242 0 1
FILE 2

Code:
 
describe strata ea block hh astrata
storage display value
variable name type format label variable label
strata int %16.0g Strata
ea int %16.0g EA ID
block byte %16.0g Block ID
hh byte %16.0g Household ID
astrata byte %16.0g astrata Analytical Strata
. sum strata ea block hh astrata
Variable Obs Mean Std. Dev. Min Max
strata 474,025 256.171 180.3539 101 1303
ea 474,025 171.3944 97.98881 1 341
block 139,430 19.75147 7.056427 1 44
hh 474,025 6.567827 3.51177 1 19
astrata 474,025 13.83234 5.129155 3 22