Hello,
I'm a new Stata user and struggling to match survey data on village level with data for households belonging to those villages. Each village is identified by an 8-digit code and each household is identified by a 12-digit code where the first 8 digits are the same as the village they belong to. E.g. village ID is 88888888 and household IDs 888888881234 888888881235 and so on. Is there any command which would pick out observations beginning with the 8 digits? Also, it there any way to do this automatically for all the villages (there is about 200 of them)?
Thank you very much for any advice
I'm a new Stata user and struggling to match survey data on village level with data for households belonging to those villages. Each village is identified by an 8-digit code and each household is identified by a 12-digit code where the first 8 digits are the same as the village they belong to. E.g. village ID is 88888888 and household IDs 888888881234 888888881235 and so on. Is there any command which would pick out observations beginning with the 8 digits? Also, it there any way to do this automatically for all the villages (there is about 200 of them)?
Thank you very much for any advice
Comment