Support #1629

Merging Variable vote_7

Added by Jan Heinicke 6 months ago. Updated 6 months ago.

Survey design
Start date:
% Done:



Dear Madame or Sir,

i am a stundent and am using the bhps and ukhls datasets in a project.

I have a question concerning the merge of the waves of the BHPS and the UKHLS.
We are using the Code that is shared online public to merge the datasets across waves and wanted to use the vote_7
variable for our analysis.
But when we used the loop that is included in the merge, the resulting variable vote_7 has a category 7 in wave 7 of BHPS with 700 observations and there is the info of a subsample which we can not find in the data.
Also, the merge led to 0 observations in wave 8 of the BHPS, but we can not identify the error for that.
Could you maybe tell us how to solve that problem or how to handle it?

THank you for your time and help.

Best wishes,



Updated by Understanding Society User Support Team 6 months ago

  • Category changed from Harmonisation to Survey design
  • % Done changed from 0 to 10
  • Private changed from Yes to No

Dear Jan,

Many thanks for your enquiry. The Understanding Society team is looking into it and we will get back to you as soon as we can.

We aim to respond to simple queries within 48 hours and more complex issues within 7 working days. While we will aim to keep to this response times due to the current coronavirus (COVID-19) related situation it may take us longer to respond.

Best wishes,
Understanding Society User Support Team


Updated by Understanding Society User Support Team 6 months ago

  • Status changed from New to Feedback
  • % Done changed from 10 to 50

Dear Jan,

The label of the value 7 of vote7 in wave7 of the BHPS reads "NA: ONS sub-sample" suggesting that this question was not asked of this sub-sample. When you cross vote7 with the variable identifying the sub-samples, hhorig, you will see that these were the members of the ECHP - ONS sub-sample.
For further details about the ECHP sub-samples please check the "II.2.1 The ECHP sub-sample" of the BHPS user manual ( , page 26 [A2-3])

Please also check this topic on the USF forum:

To get a better understanding of how the data management procedures work, I would recommend you do our Moodle course as that explains the steps you need to do and why:

The code in the syntax files available on our website here ( ; "Merging individual files across waves into long format" and "Merging individual files across waves into wide format") is the same as that in the Moodle course, but the Moodle course includes explanations, not just the syntax files without the accompanying explanation about the steps/commands.
Please take a look at the worksheets (which guides you step by step through the process) and the accompanying do file and log file on merging data into wide and long format. If after doing that you still have questions please let us know.

We will also be running a 2-day (free) workshop via Zoom in March which covers the same material as in the Moodle course, but there will be instructors present who will give short lectures and be present to answer questions as you work through the material. If you want to attend here is the information for registration:

Best wishes,
Understanding Society User Support Team

Also available in: Atom PDF