Journeys in Survey Research

  • Welcome
  • ​​Important notice
  • About the author
    • John F Hall: Career profile
    • John F Hall: Extra-curricular professional and political activities
  • About this site
    • What people have said about this site
    • Latest additions and modifications
    • How to use this site
  • Site guide + Search box
  • Dedications
  • Acknowledgments
    • Unsung heroes in support services
  • My personal pantheon (of the great and the good in survey research)
    • Mark Abrams >
      • Abrams publications
      • An interview with Mark Abrams (transcripts)
      • An interview with Mark Abrams (audio files)
      • Mark Abrams Prize
    • Angus Campbell >
      • SRU garden reception for Angus Campbell
    • Cathie Marsh
    • Tony Coxon
    • Roger Jowell
    • James A Davis
    • Norman Nie
  • Recent and planned activities
  • Textbooks for Research Methods and Data Analysis
    • Textbooks: SPSS >
      • Highly recommended SPSS textbooks >
        • McInnes (2017) >
          • MacInnes, Chapter 4:​ Getting Started with SPSS
          • MacInnes, Chapter 5 Dealing with Data Documentation
          • MacInness 2017 (Web links)
        • Marsh and Elliott (2008)
        • Sweet and Grace-Martin 2012
        • Babbie, Halley, Wagner and Zaino 2013
        • Babbie, Wagner and Zaino 2019
        • Julie Pallant, SPSS Survival Manual
        • Andy Field
        • Boslaugh 2005
        • McCormick & Salcedo (2015)
        • McCormick & Salcedo (2017)
      • SPSS textbooks worth a look >
        • Hy (1977)
      • On-line SPSS textbooks
      • Textbooks requested or awaiting review
    • Textbooks: Statistics for Social Research >
      • de Vries 2018
      • Bergin (2018)
    • Textbooks: Survey Methods >
      • Crouch & Housden (2003)
      • Andres (2012)
      • Blair, Czala and Blair (2014)
      • de Vaus (2014)
      • Hoinville, Jowell et al (1977)
      • Marsden & Wright [Eds] (2010) >
        • Contributors to Handbook of Survey Research
      • Marsh (1982)
      • Moser & Kalton (1971)
      • Oppenheim (1992)
      • Pallant 2016
    • Textbooks: Data curation and sharing >
      • Corti et el (2014)
  • 1: Survey Analysis Workshop (SPSS)
    • What is SPSS?
    • SPSS Without Tears >
      • My first time: in at the SPSS deep end (1972)
    • Introduction to Survey Analysis Workshop (SPSS) >
      • IBM® SPSS® Statistics (Overview)
      • Note on SPSS tutorials on this site
      • Background to current project >
        • Author's note
      • SPSS versions used
      • Stata and SPSS
    • Summary guide to SPSS tutorials >
      • Block 1: From questionnaire to SPSS saved file
      • Block 2: Analysing one variable >
        • 2.1: Nominal and ordinal variables
        • 2.2: Interval scale variables
        • 2.3: Data transformations
      • Block 3: Analysing two variables (and sometimes three) >
        • 3.1 Two variables (CROSSTABS)
        • 3.2 Three (or more) variables
        • 3.3 Multiple response (MULT RESPONSE)
        • 3.4 Conditional data transformations (IF and DO IF)
        • 3.5 Derived variables (COUNT and COMPUTE) >
          • 3.5.1 Introduction to COUNT and COMPUTE
          • 3.5.2 Teenage Attitudes (Tutorials)
      • Block 4: Hypothesis testing
      • SPSS files and documentation used for tutorials and exercises >
        • Data sets used in Survey Analysis Workshop >
          • British Social Attitudes
          • Pre-course questionnaire on interests and experience
          • Quality of Life in Britain
    • Useful links for SPSS >
      • On-line SPSS Intros and tutorials
      • SPSS courses
  • 1a: Statistical concepts and methods
  • 1b: Teaching with Survey Data
    • SN 28: Relative Deprivation and Social Justice 1962-63
  • 1c: Developing research projects using survey data
  • 1d: Workshop and presentations for ASSESS (SPSS users in Europe)
    • Old Dog, Old Tricks: Using SPSS syntax to beat the mouse-trap
    • The Beginners' Guide to Survey Analysis Using SPSS
    • Close Encounters of the Fourth Kind: working with alien SPSS files
    • ASSESS 2014 Links to Contents
  • 2: Survey Research Practice
    • SR 502: Survey Research Practice (1976 - 1992)
    • Courses in Survey Methods >
      • (United Kingdom) Degrees, diplomas and certificates
      • (USA & Canada) Degrees, diplomas and certificates in survey research
      • Summer schools for survey methods
      • Short courses for survey research
    • Opinion polls >
      • Election poll débâcles
    • Web-based resources for survey research >
      • Survey Resources Network
      • On-line surveys
      • Question Banks
      • Survey methods guides and tutorials
      • Clips, tips and blogs
    • Useful links for Survey Research
  • 2a: Survey Research Methodology, Practice and Training
    • The place of survey research in the social sciences
    • Survey Research and Social Action
    • Academic centres specialising in survey research >
      • United Kingdom
      • USA and Canada
      • Europe
    • Professional and Voluntary Associations
    • Survey research organisations
    • Journals for survey research
    • Articles on survey research
  • 2b: Major survey series
    • United Kingdom (Major survey series: academic and other) >
      • British Social Attitudes >
        • British Social Attitudes: ​Exploring the SPSS files >
          • British Social Attitudes 1983 onwards: Cumulative SPSS file
          • British Social Attitudes: Making files from different years compatible
    • United Kingdom (Major survey series: government) >
      • ONS National Well-being
    • Europe (Major survey series)
    • USA (Major survey series)
  • 3: Subjective Social Indicators (Quality of Life)
    • Quality of Life: Measurement and methodology
    • Measures of psychological well-being
    • Values and Quality of Life
    • SSRC Survey Unit Quality of Life in Britain surveys 1971-1975 >
      • Abstracts, data and documentation
      • Publications based on the SSRC Quality of Life in Britain surveys >
        • Bibliography for Quality of Life in Britain and related surveys
        • Quality of Life of the Elderly in Residential Care
      • Surveys in schools >
        • "Trinians" survey
        • Playground to Politics
  • 4: Survey Unit, Social Science Research Council (UK)
    • Surveys by SSRC Survey Unit
    • Publications: SSRC Survey Unit
    • Courses, Conferences and Seminars
  • 5a: Polytechnic of North London (1976-1992)
  • 5b: Survey Research Unit (1978-1992)
    • SRU Student publications
    • Training courses in survey methods
    • The place of SRU within PNL >
      • Director's Working Group on the Survey Research Unit
  • Village life in Normandy
    • Notre Dame de Cenilly >
      • Fête St Clair 2007
      • Fête St Clair 2010
      • Fête St Clair 2012 National pedal-car championships
      • La Noslière de Bas
    • War and Peace in N D de Cenilly >
      • Armistice Day
      • German Occupation (1940 - 1944)
      • D-Day (6th June 1944) >
        • D-Day ceremony 9 June 2013
        • D-Day 70th Anniversary 2014
        • Lancaster bomber crew (Memorial Ceremony 8 June 2011)
        • Lancaster bomber crew (Memorial Ceremony 8 June 2014)
        • Lancaster bomber crew (Memorial Ceremony 7 June 2015)
        • Lancaster bomber crew ​(Memorial ceremony 5 June 2016)
      • Liberation July 1944 >
        • Field hospital in N D de Cenilly
        • Liberation celebrations (July 2006)
        • Visit of US 2nd Armored Division veterans (2 Sep 2009)
        • Liberation celebrations 2014
        • Unveiling of new monument (13 June 2015)
        • Re-enactment camp (Gavray, 11 July 2015)
    • Midsummer music
    • Paris trip (post Brexit)
  • Contact
  • Origins of the British Crime Survey
  • British Crime Survey

2.3:  Data transformations

[Page last updated: 14 January 2020]

Selecting variables for analysis, changing the names of variables, changing the values of variables.  Creating new variables from existing ones.  Selecting cases for analysis as a transition from analysing one variable to analysing two or more variables.

We have now reached the stage where you are about to experience a change of gear, moving from one variable to two variables and then three (or more). Some of the exercises in Block 3 for 2- and 3-way CROSSTABS (zero order and 1st order tables) involve some quite complex recoding of variables (qualifications obtained by education or training, combinations of income from various sources) to generate derived variables with two to five categories suitable for beginners to tabulate.  

Doing this yourselves from raw data files would be quite daunting (and possibly unsuccessful).  For the more adventurous of you, I am working on supplementary exercises to do this in syntax yourselves. 

To make things easier I have uploaded a few entire surveys in SPSS *.sav format.  These files include some derived variables, but we shall be modifying them or creating others.  We shall be working with complete data sets from major surveys and need to download some raw data *.txt files and some SPSS *.sav files from this site.  The simplest solution is to download and save them to a memory stick or a CD on your own computer.

2.3.0  Preliminary file downloads shows you how to do this.  Later versions of SPSS can now open and work on files immediately they are downloaded from this site.  From now on, tutorials will use selected *.txt raw data files and (extracts from) SPSS *.sav and occasional *.sps files.   

The first set of files we shall be using are:

Raw data files
bsa86.txt                British Social Attitudes 1986                                                       (3.3 mb)
bsa89.txt                British Social Attitudes 1989  (excluding Northern Ireland)         (3.9 mb)
myclass.txt             Cumulative raw data set                                                                 (6 kb)   
 
SPSS saved files
bsa86.sav            British Social Attitudes 1986                                                   (2.0 mb)
newbsa89.sav     British Social Attitudes 1989  (excluding Northern Ireland)     (3.2 mb) 
fifthx.sav              Fifth Form Survey                                                                     (67 kb)
myclass.sav        Initial cumulative data from pre-course questionnaire                 (6 kb)
qlgb75.sav          Quality of Life in Britain 1975                                                   (185 kb)

As we progress through the course, we may also be using files from later waves of the British Social Attitudes survey, or from other major surveys such as the NORC General Social Survey (University of Chicago, USA) and the European Social Survey.

Screen messages during data transformations is a specimen work-through to create two new variables, agedecade and agegroup from existing variable age in myclass.sav  (my version of the initial data from the pre-course questionnaire).  After these transformations, the new variables are set to SPSS defaults which some of you may be tempted to edit in your Data Editor using the GUI.  The work-through demonstrates some of the unexpected problems you may encounter, how to get round them, and suggests alternatives using syntax.
 


2.3.1.1  Data transformations is an Introductory tutorial.  
    
The following work-through exercises are beta versions using data from the main 1986 BSA survey.  
    2.3.1.2a1  Select and rename variables 
     Exercise using SPSS command GET. . .  /KEEP to select variables from the main 1986 BSA survey,
     change the variable names and edit variable properties.

    2.3.1.2a2 Recode into new variable
    Exercise to create a new variable using RECODE ... INTO

The following homework exercises are beta versions using data from the main 1989 BSA survey. 

    2.3.1.2b1  Select, rename and recode homework
    Homework exercise using SPSS command  GET. . .  /KEEP to select variables from the main 1989
     BSA survey, change the variable names and  edit variable properties.

    2.3.1.2b2  Select, rename and recode specimen answer
    Specimen answer for homework exercise to create a new variable using  RECODE  ... INTO
    Includes a bit of housekeeping to avoid clutter


2.3.1.3  Conditional frequencies exercise
Research question:  What is the distribution of respondents' personal gross income from paid work?  What
shape does the distribution have?  What is the distribution for women only? What is the distribution for men
only?  Are there any differences? 

2.3.1.4  Specimen answers for exercise 2.3.1.3 (Conditional frequencies)
This is the final draft of a very extended and detailed exercise: it's quite long (26 pages) but manageable.  It uses data from the 1986 British Social Attitudes survey as an exemplar in preparation for moving from
analysing one variable to analysing two or more variables.

[Brand new homework beta versions added 2July 2013]
2.3.1.5 Conditional frequencies homework [BSA89]
Repeats exercise 2.3.1.3 on the same variables from the 1989 British Social Attitudes survey.

[Specimen answers for 2.3.1.5]

2.3.1.6.1  Specimen answer for conditional frequencies homework [Tasks 1 and 2]
    (also creates SPSS files 2.3.1.6.1.sps and  2.3.1.6.1.sav)
2.3.1.6.2  Specimen answer for conditional frequencies homework [Tasks 3 and 4]
 
   (also creates 2.3.1.6.2.sps)

See also:  3.4 Conditional data transformations and 3.5 Derived variables COUNT and COMPUTE

Forward to page:     Block 3:  Analysing two variables ( and sometimes three)
Back to page:           Block 2:  Analysing one variable
Back to page:           Summary guide to SPSS  tutorials

Proudly powered by Weebly
  • Welcome
  • ​​Important notice
  • About the author
    • John F Hall: Career profile
    • John F Hall: Extra-curricular professional and political activities
  • About this site
    • What people have said about this site
    • Latest additions and modifications
    • How to use this site
  • Site guide + Search box
  • Dedications
  • Acknowledgments
    • Unsung heroes in support services
  • My personal pantheon (of the great and the good in survey research)
    • Mark Abrams >
      • Abrams publications
      • An interview with Mark Abrams (transcripts)
      • An interview with Mark Abrams (audio files)
      • Mark Abrams Prize
    • Angus Campbell >
      • SRU garden reception for Angus Campbell
    • Cathie Marsh
    • Tony Coxon
    • Roger Jowell
    • James A Davis
    • Norman Nie
  • Recent and planned activities
  • Textbooks for Research Methods and Data Analysis
    • Textbooks: SPSS >
      • Highly recommended SPSS textbooks >
        • McInnes (2017) >
          • MacInnes, Chapter 4:​ Getting Started with SPSS
          • MacInnes, Chapter 5 Dealing with Data Documentation
          • MacInness 2017 (Web links)
        • Marsh and Elliott (2008)
        • Sweet and Grace-Martin 2012
        • Babbie, Halley, Wagner and Zaino 2013
        • Babbie, Wagner and Zaino 2019
        • Julie Pallant, SPSS Survival Manual
        • Andy Field
        • Boslaugh 2005
        • McCormick & Salcedo (2015)
        • McCormick & Salcedo (2017)
      • SPSS textbooks worth a look >
        • Hy (1977)
      • On-line SPSS textbooks
      • Textbooks requested or awaiting review
    • Textbooks: Statistics for Social Research >
      • de Vries 2018
      • Bergin (2018)
    • Textbooks: Survey Methods >
      • Crouch & Housden (2003)
      • Andres (2012)
      • Blair, Czala and Blair (2014)
      • de Vaus (2014)
      • Hoinville, Jowell et al (1977)
      • Marsden & Wright [Eds] (2010) >
        • Contributors to Handbook of Survey Research
      • Marsh (1982)
      • Moser & Kalton (1971)
      • Oppenheim (1992)
      • Pallant 2016
    • Textbooks: Data curation and sharing >
      • Corti et el (2014)
  • 1: Survey Analysis Workshop (SPSS)
    • What is SPSS?
    • SPSS Without Tears >
      • My first time: in at the SPSS deep end (1972)
    • Introduction to Survey Analysis Workshop (SPSS) >
      • IBM® SPSS® Statistics (Overview)
      • Note on SPSS tutorials on this site
      • Background to current project >
        • Author's note
      • SPSS versions used
      • Stata and SPSS
    • Summary guide to SPSS tutorials >
      • Block 1: From questionnaire to SPSS saved file
      • Block 2: Analysing one variable >
        • 2.1: Nominal and ordinal variables
        • 2.2: Interval scale variables
        • 2.3: Data transformations
      • Block 3: Analysing two variables (and sometimes three) >
        • 3.1 Two variables (CROSSTABS)
        • 3.2 Three (or more) variables
        • 3.3 Multiple response (MULT RESPONSE)
        • 3.4 Conditional data transformations (IF and DO IF)
        • 3.5 Derived variables (COUNT and COMPUTE) >
          • 3.5.1 Introduction to COUNT and COMPUTE
          • 3.5.2 Teenage Attitudes (Tutorials)
      • Block 4: Hypothesis testing
      • SPSS files and documentation used for tutorials and exercises >
        • Data sets used in Survey Analysis Workshop >
          • British Social Attitudes
          • Pre-course questionnaire on interests and experience
          • Quality of Life in Britain
    • Useful links for SPSS >
      • On-line SPSS Intros and tutorials
      • SPSS courses
  • 1a: Statistical concepts and methods
  • 1b: Teaching with Survey Data
    • SN 28: Relative Deprivation and Social Justice 1962-63
  • 1c: Developing research projects using survey data
  • 1d: Workshop and presentations for ASSESS (SPSS users in Europe)
    • Old Dog, Old Tricks: Using SPSS syntax to beat the mouse-trap
    • The Beginners' Guide to Survey Analysis Using SPSS
    • Close Encounters of the Fourth Kind: working with alien SPSS files
    • ASSESS 2014 Links to Contents
  • 2: Survey Research Practice
    • SR 502: Survey Research Practice (1976 - 1992)
    • Courses in Survey Methods >
      • (United Kingdom) Degrees, diplomas and certificates
      • (USA & Canada) Degrees, diplomas and certificates in survey research
      • Summer schools for survey methods
      • Short courses for survey research
    • Opinion polls >
      • Election poll débâcles
    • Web-based resources for survey research >
      • Survey Resources Network
      • On-line surveys
      • Question Banks
      • Survey methods guides and tutorials
      • Clips, tips and blogs
    • Useful links for Survey Research
  • 2a: Survey Research Methodology, Practice and Training
    • The place of survey research in the social sciences
    • Survey Research and Social Action
    • Academic centres specialising in survey research >
      • United Kingdom
      • USA and Canada
      • Europe
    • Professional and Voluntary Associations
    • Survey research organisations
    • Journals for survey research
    • Articles on survey research
  • 2b: Major survey series
    • United Kingdom (Major survey series: academic and other) >
      • British Social Attitudes >
        • British Social Attitudes: ​Exploring the SPSS files >
          • British Social Attitudes 1983 onwards: Cumulative SPSS file
          • British Social Attitudes: Making files from different years compatible
    • United Kingdom (Major survey series: government) >
      • ONS National Well-being
    • Europe (Major survey series)
    • USA (Major survey series)
  • 3: Subjective Social Indicators (Quality of Life)
    • Quality of Life: Measurement and methodology
    • Measures of psychological well-being
    • Values and Quality of Life
    • SSRC Survey Unit Quality of Life in Britain surveys 1971-1975 >
      • Abstracts, data and documentation
      • Publications based on the SSRC Quality of Life in Britain surveys >
        • Bibliography for Quality of Life in Britain and related surveys
        • Quality of Life of the Elderly in Residential Care
      • Surveys in schools >
        • "Trinians" survey
        • Playground to Politics
  • 4: Survey Unit, Social Science Research Council (UK)
    • Surveys by SSRC Survey Unit
    • Publications: SSRC Survey Unit
    • Courses, Conferences and Seminars
  • 5a: Polytechnic of North London (1976-1992)
  • 5b: Survey Research Unit (1978-1992)
    • SRU Student publications
    • Training courses in survey methods
    • The place of SRU within PNL >
      • Director's Working Group on the Survey Research Unit
  • Village life in Normandy
    • Notre Dame de Cenilly >
      • Fête St Clair 2007
      • Fête St Clair 2010
      • Fête St Clair 2012 National pedal-car championships
      • La Noslière de Bas
    • War and Peace in N D de Cenilly >
      • Armistice Day
      • German Occupation (1940 - 1944)
      • D-Day (6th June 1944) >
        • D-Day ceremony 9 June 2013
        • D-Day 70th Anniversary 2014
        • Lancaster bomber crew (Memorial Ceremony 8 June 2011)
        • Lancaster bomber crew (Memorial Ceremony 8 June 2014)
        • Lancaster bomber crew (Memorial Ceremony 7 June 2015)
        • Lancaster bomber crew ​(Memorial ceremony 5 June 2016)
      • Liberation July 1944 >
        • Field hospital in N D de Cenilly
        • Liberation celebrations (July 2006)
        • Visit of US 2nd Armored Division veterans (2 Sep 2009)
        • Liberation celebrations 2014
        • Unveiling of new monument (13 June 2015)
        • Re-enactment camp (Gavray, 11 July 2015)
    • Midsummer music
    • Paris trip (post Brexit)
  • Contact
  • Origins of the British Crime Survey
  • British Crime Survey