Support #1847

Panel construction across all UKHLS for paygu_dv

Added by Vriddhi Khattar over 1 year ago. Updated 6 months ago.

Data management
Start date:
% Done:



Using the data management syntax available on your website, I was able to match parents with their children, and using those matched files, I was able to construct a matched and merged file for data concerning parents and their children. My research focuses on intergenerational mobility in Britain so it is important for me to have data for the variable paygu_dv across all waves. However, this yields an unbalanced panel, and unfortunately, doesn't allow me to run regressions because stata shows an error saying 'no observations' despite efforts to treat it as a panel. I understand that there may be missing data and inconsistencies but I've tried to include survey weights and conduct a weighted longitudinal analysis but that hasn't worked. I have also tried the tsspell command to potentially try and balance the panel and that hasn't worked either. I am just unsure if there is something I am missing. I saw a couple of other queries about a similar issue but I did not seem to understand the solution. I am incredibly sorry for my incompetence but I'm not sure how this issue can be resolved. Thanks in advance x



Updated by Understanding Society User Support Team over 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
  • Private changed from Yes to No

Hello Vriddhi

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.

Best wishes,
Understanding Society User Support Team


Updated by Understanding Society User Support Team over 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 10 to 50

Hello Vriddhi

As Understanding Society is a longitudinal study there is always a missingness risk involved. This may be a result of non-response, participant drop-out or data collected only in some waves, among others. Therefore when you construct a panel there is a chance it would be unbalanced.

Stata will exclude observations with missing values from any statistical estimation. Then you will have to deal with the missingness first to analyse your panel. Dealing with non-response will depend if missingness is random or systematic (related to some sort of characteristics). You might remove missing observations or use multiple imputation models, which would depend on your analysis and research objectives.

You might want to use the help menu in Stata to go through the “xt” series of commands that provide tools for analyzing panel data. As well as the “mi” suite of commands that deals with multiple-imputation data. You may have a look also at “ipoalte” to create linear interpolations.

If you want to have more information about non-response and attrition in Understanding Society you can check this publication:

Hope this helps

Best wishes

Roberto Cavazos
Understanding Society User Support Team


Updated by Understanding Society User Support Team over 1 year ago

  • Category set to Data management

Updated by Understanding Society User Support Team 6 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 50 to 100

Also available in: Atom PDF