Support #486

BHPS education leaving age variables

Added by Stefanie Jane about 5 years ago. Updated almost 5 years ago.

Data analysis
Start date:
% Done:



Hi, I'm trying to create a variable for bhps that gives an overall 'education leaving age' which takes account of school leaving age (scend) or further education leaving age (feend) depending on which is relevant (i.e depending on whether respondent went to further education, whether respondent has left school or FE) and alternatively gives a different value(for example 100) if the respondent is still in education (either school or FE), in order to ultimately create a 'number of years out of education' variable.

I am having trouble getting my head around the syntax to use because of the way the bhps variables are set up. I have tried numerous syntaxes ad get very different results each time. Could you please suggest correct syntax to use here. I am in a bit of an urgent situation as need to produce some regression analyses asap.

Thanks and best wishes,


Updated by Victoria Nolan about 5 years ago

  • Status changed from New to In Progress
  • Assignee changed from Alita Nandi to Stefanie Jane
  • % Done changed from 0 to 10

Dear Stefanie,

Many thanks for your enquiry.

Would you be able to send on a copy of the syntax that you are using, so that we can look into what the problem might be?

Feel free to email this to me if it is not possible to include it in a reply on the forum ().

Many thanks,


On behalf of the Understanding Society User Support Team


Updated by Victoria Nolan almost 5 years ago

  • Assignee changed from Stefanie Jane to Alita Nandi
  • % Done changed from 10 to 50

Hi Alita,

Stefanie emailed me with the details below - are you able yo follow up? Many thanks, Victoria.

Dear Victoria,

I couldn't actually work out how to reply in the forum at all, so I'm emailing instead. I'm so sorry about my late reply - I was away for a few courses last week and this ended up slipping my mind.

The syntax (in SPSS) I tried is as follows

education leaving age.

compute eduleave = -9.
if (fenow = 1) eduleave = -10.
if (school = 2) eduleave = -10.
if (feend ge scend) eduleave = feend.
if (fenow le -1) eduleave = scend.
freq eduleave.

Thanks a lot for your help. I will try again to reply in the forum as this could be an issue for others.

Best wishes,


Postgraduate Research Student
Sociology and Social Policy
University of Nottingham


Updated by Alita Nandi almost 5 years ago

If there is someone who has completed school but is in further education, for them ascend>0 but afeend==-8. So, by your code
if (fenow le -1) eduleave = scend.
I think their education leaving age will be coded as ascend. But they should be coded as -10. Was this the problem? If not, please write to us and we will try to resolve this.


Updated by Alita Nandi almost 5 years ago

  • Assignee changed from Alita Nandi to Stefanie Jane
  • % Done changed from 50 to 90

Updated by Victoria Nolan almost 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF