Hello all,
I have individual level data and village level data.
The individual identifiers are 7character variables and start with 4
characters that represent the village where the individual is in.
           .  list pid in 1/5
     +---------+
     |    pid |
     |---------|
  1. | V001002 |
  2. | V001022 |
  3. | V001026 |
  4. | V001032 |
  5. | V001037 |
     +---------+
In the village data, there is village id variable which is similar to
the 4 characters above.
 .  list vid in 1/5
     +---------+
     |    vid  |
     |---------|
  1. | V001 |
  2. | V001 |
  3. | V001 |
  4. | V001 |
  5. | V001 |
     +---------+
My question is:  I don't know how to extract the village identifier
from the individual identifier for me to merge the village level data
into the individual level data.
I know I cannot put any attachement in the statalist emails but I hope
I am clear on my question.
Thank you in advance.
Nirina
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/