- Welcome
- Important notice
- About the author
- About this site
- Site guide + Search box
- Dedications
- Acknowledgments
- My personal pantheon (of the great and the good in survey research)
- Recent and planned activities
- Textbooks for Research Methods and Data Analysis
- 1: Survey Analysis Workshop (SPSS)
- 1a: Statistical concepts and methods
- 1b: Teaching with Survey Data
- 1c: Developing research projects using survey data
- 1d: Workshop and presentations for ASSESS (SPSS users in Europe)
- 2: Survey Research Practice
- 2a: Survey Research Methodology, Practice and Training
- 2b: Major survey series
- 3: Subjective Social Indicators (Quality of Life)
- 4: Survey Unit, Social Science Research Council (UK)
- 5a: Polytechnic of North London (1976-1992)
- 5b: Survey Research Unit (1978-1992)
- Village life in Normandy
- Contact
- Origins of the British Crime Survey
- British Crime Survey
British Social Attitudes: Making files from different years compatible
[New page 28 September 2018; last updated 28 March 2020]
Page still under construction
bsa1983to2017.sav is a cumulative SPSS "mother" file I have been building since 2014. Detailed accounts of the processes and stages involved, and why I did it, are on page British Social Attitudes 1983 to 2014: Cumulative SPSS file. At 1.21gb, the mother file is enormous: it is constructed in reverse year order 2017 to 10983 and contains 11,590 variables and 102,900 cases.
Data safeguarding
Because the data are safeguarded, no actual data can be uploaded to this site.
A solution suggested by UKDS was that I post the syntax used to create the cumulative SPSS "mother" file, but this runs to dozens of SPSS setup files containing hundreds of lines of syntax, some complex Python code and, for some tasks, dozens of ad-hoc switches between SPSS and Excel.
A brilliant alternative, and much simpler, solution (suggested by Jon Peck, retired Senior Software Engineer, IBM-SPSS) which meets data safeguarding requirements, has been to create a version of the SPSS mother file containing no cases and use the SPSS command APPLY DICTIONARY to create mutually compatible files for each year.
This file is now downloadable from this site as: bsa1983to2017zerocases.sav
Data compatibility
The original data files for each year are not mutually compatible as to metadata. Variables may have the same names, but are stored as various data types, and with a range of different formats, widths, measurement levels, variable labels, value labels and missing value specifications. To merge the files, they first have to be made compatible.
For an example of creating a variable for year of interview see:
British Social Attitudes Survey 1983 onwards: Date of interview
How to make files from different years compatible
To download individual year files from UKDS you have to be a registered and authorised user. You can download the source files you need direct from UKDS using the following table:
SN Link to file at UKDS On-line Natcen reports
8606 British Social Attitudes Survey 2018 British Social Attitudes 36
8450 British Social Attitudes Survey 2017
8252 British Social Attitudes Survey. 2016 British Social Attitudes 35
8116 British Social Attitudes Survey, 2015 British Social Attitudes 34
7809 British Social Attitudes Survey, 2014 British Social Attitudes 33
7500 British Social Attitudes Survey, 2013 British Social Attitudes 32
7476 British Social Attitudes Survey, 2012 British Social Attitudes 31
7237 British Social Attitudes Survey, 2011 British Social Attitudes 30
6969 British Social Attitudes Survey, 2010 British Social Attitudes 29
6695 British Social Attitudes Survey, 2009 British Social Attitudes 28
[No on-line reports for 1983 to 2008]
6390 British Social Attitudes Survey, 2008
6240 British Social Attitudes Survey, 2007
5823 British Social Attitudes Survey, 2006
5618 British Social Attitudes Survey, 2005
5329 British Social Attitudes Survey, 2004
5235 British Social Attitudes Survey, 2003
4838 British Social Attitudes Survey, 2002
4615 British Social Attitudes Survey, 2001
4486 British Social Attitudes Survey, 2000
4318 British Social Attitudes Survey, 1999
4131 British Social Attitudes Survey, 1998
4072 British Social Attitudes Survey, 1997
3921 British Social Attitudes Survey, 1996
2952 British Social Attitudes Survey, 1991
3764 British Social Attitudes Survey, 1995
3572 British Social Attitudes Survey, 1994
3439 British Social Attitudes Survey, 1993
2840 British Social Attitudes Survey, 1990
2723 British Social Attitudes Survey, 1989
2567 British Social Attitudes Survey, 1987
2315 British Social Attitudes Survey, 1986
2096 British Social Attitudes Survey, 1985
2035 British Social Attitudes Survey, 1984
1935 British Social Attitudes Survey, 1983
Downloaded files can then be processed, one at a time, in any order.
Example of procedure to follow:
1: Download bsa1983to2017zerocases from this site to e.g. Desktop.
2: Download a source file from UKDS to e.g. Desktop.
3: Open a new SPSS syntax editor and write in your commands.
Format:
GET FILE= <'zero cases mother file'>.
GET FILE= '<bsa data file for specific year>'.
APPLY DICTIONARY FROM <'zero cases mother file'>
SAVE OUTFILE= '<target.sav>'.
For example, using the 2016 and 2017 surveys, I can write:
GET FILE= 'C:\Users\John Hall\Desktop\bsa1983to2017zerocases '.
GET FILE='C:\Users\John Hall\Desktop\input\bsa16_to_ukda.sav'.
APPLY DICTIONARY FROM 'C:\Users\John Hall\Desktop\bsamother_zerocases.sav'
/FILEINFO all
/VARINFO all.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016.sav'
/COMPRESSED.
*File bsa2016.sav is written to Desktop.
Running the above syntax will fetch file bsa16_to_ukda.sav from Desktop, create a new file bsa2016.sav, compatible with other files generated by the same process, and save it back to Desktop. The new file will contain only the 822 variables used in 2016, not the full set of 11,590 in the mother file.
GET FILE='C:\Users\John Hall\Desktop\bsa2017_for_ukda.sav'.
APPLY DICTIONARY FROM 'C:\Users\John Hall\Desktop\bsamother_zerocases.sav'
/FILEINFO all
/VARINFO all.
COMPUTE year = 2017.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2017.sav'
/COMPRESSED.
*File bsa2017.sav is written to Desktop.
ADD FILES file dataset3 /file dataset2.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016_2017.sav'
/keep year sserial to rsex rage RAgeE to rearnq newrearnq rearn
SelfComp to HHincome .
Running the above syntax will fetch file bsa2017_for_ukda.sav from Desktop, create a new file bsa2017.sav, compatible with other files generated by the same process, and save it back to Desktop. The new file will contain only the 1160 variables, not the full set of 11,590 in the mother file.
Once you have converted the files you need, you can use the SPSS command:
ADD FILES to combine any or all of them into a single file.e.g:
GET FILE= 'C:\Users\John Hall\Desktop\bsa2016'.
GET FILE='C:\Users\John Hall\Desktop\bsa2017sav'.
ADD FILES file 'C:\Users\John Hall\Desktop\bsa2017.sav'
/file 'C:\Users\John Hall\Desktop\bsa2016.sav'.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016_2017.sav'
/keep year sserial to rsex rage RAgeE to rearnq newrearnq rearn
SelfComp to HHincome .
The new file will contain only 1045 variables, not the full set of 11,995 in the new mother file.
which includes the 2018 data.
Page still under construction
bsa1983to2017.sav is a cumulative SPSS "mother" file I have been building since 2014. Detailed accounts of the processes and stages involved, and why I did it, are on page British Social Attitudes 1983 to 2014: Cumulative SPSS file. At 1.21gb, the mother file is enormous: it is constructed in reverse year order 2017 to 10983 and contains 11,590 variables and 102,900 cases.
Data safeguarding
Because the data are safeguarded, no actual data can be uploaded to this site.
A solution suggested by UKDS was that I post the syntax used to create the cumulative SPSS "mother" file, but this runs to dozens of SPSS setup files containing hundreds of lines of syntax, some complex Python code and, for some tasks, dozens of ad-hoc switches between SPSS and Excel.
A brilliant alternative, and much simpler, solution (suggested by Jon Peck, retired Senior Software Engineer, IBM-SPSS) which meets data safeguarding requirements, has been to create a version of the SPSS mother file containing no cases and use the SPSS command APPLY DICTIONARY to create mutually compatible files for each year.
This file is now downloadable from this site as: bsa1983to2017zerocases.sav
Data compatibility
The original data files for each year are not mutually compatible as to metadata. Variables may have the same names, but are stored as various data types, and with a range of different formats, widths, measurement levels, variable labels, value labels and missing value specifications. To merge the files, they first have to be made compatible.
For an example of creating a variable for year of interview see:
British Social Attitudes Survey 1983 onwards: Date of interview
How to make files from different years compatible
To download individual year files from UKDS you have to be a registered and authorised user. You can download the source files you need direct from UKDS using the following table:
SN Link to file at UKDS On-line Natcen reports
8606 British Social Attitudes Survey 2018 British Social Attitudes 36
8450 British Social Attitudes Survey 2017
8252 British Social Attitudes Survey. 2016 British Social Attitudes 35
8116 British Social Attitudes Survey, 2015 British Social Attitudes 34
7809 British Social Attitudes Survey, 2014 British Social Attitudes 33
7500 British Social Attitudes Survey, 2013 British Social Attitudes 32
7476 British Social Attitudes Survey, 2012 British Social Attitudes 31
7237 British Social Attitudes Survey, 2011 British Social Attitudes 30
6969 British Social Attitudes Survey, 2010 British Social Attitudes 29
6695 British Social Attitudes Survey, 2009 British Social Attitudes 28
[No on-line reports for 1983 to 2008]
6390 British Social Attitudes Survey, 2008
6240 British Social Attitudes Survey, 2007
5823 British Social Attitudes Survey, 2006
5618 British Social Attitudes Survey, 2005
5329 British Social Attitudes Survey, 2004
5235 British Social Attitudes Survey, 2003
4838 British Social Attitudes Survey, 2002
4615 British Social Attitudes Survey, 2001
4486 British Social Attitudes Survey, 2000
4318 British Social Attitudes Survey, 1999
4131 British Social Attitudes Survey, 1998
4072 British Social Attitudes Survey, 1997
3921 British Social Attitudes Survey, 1996
2952 British Social Attitudes Survey, 1991
3764 British Social Attitudes Survey, 1995
3572 British Social Attitudes Survey, 1994
3439 British Social Attitudes Survey, 1993
2840 British Social Attitudes Survey, 1990
2723 British Social Attitudes Survey, 1989
2567 British Social Attitudes Survey, 1987
2315 British Social Attitudes Survey, 1986
2096 British Social Attitudes Survey, 1985
2035 British Social Attitudes Survey, 1984
1935 British Social Attitudes Survey, 1983
Downloaded files can then be processed, one at a time, in any order.
Example of procedure to follow:
1: Download bsa1983to2017zerocases from this site to e.g. Desktop.
2: Download a source file from UKDS to e.g. Desktop.
3: Open a new SPSS syntax editor and write in your commands.
Format:
GET FILE= <'zero cases mother file'>.
GET FILE= '<bsa data file for specific year>'.
APPLY DICTIONARY FROM <'zero cases mother file'>
SAVE OUTFILE= '<target.sav>'.
For example, using the 2016 and 2017 surveys, I can write:
GET FILE= 'C:\Users\John Hall\Desktop\bsa1983to2017zerocases '.
GET FILE='C:\Users\John Hall\Desktop\input\bsa16_to_ukda.sav'.
APPLY DICTIONARY FROM 'C:\Users\John Hall\Desktop\bsamother_zerocases.sav'
/FILEINFO all
/VARINFO all.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016.sav'
/COMPRESSED.
*File bsa2016.sav is written to Desktop.
Running the above syntax will fetch file bsa16_to_ukda.sav from Desktop, create a new file bsa2016.sav, compatible with other files generated by the same process, and save it back to Desktop. The new file will contain only the 822 variables used in 2016, not the full set of 11,590 in the mother file.
GET FILE='C:\Users\John Hall\Desktop\bsa2017_for_ukda.sav'.
APPLY DICTIONARY FROM 'C:\Users\John Hall\Desktop\bsamother_zerocases.sav'
/FILEINFO all
/VARINFO all.
COMPUTE year = 2017.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2017.sav'
/COMPRESSED.
*File bsa2017.sav is written to Desktop.
ADD FILES file dataset3 /file dataset2.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016_2017.sav'
/keep year sserial to rsex rage RAgeE to rearnq newrearnq rearn
SelfComp to HHincome .
Running the above syntax will fetch file bsa2017_for_ukda.sav from Desktop, create a new file bsa2017.sav, compatible with other files generated by the same process, and save it back to Desktop. The new file will contain only the 1160 variables, not the full set of 11,590 in the mother file.
Once you have converted the files you need, you can use the SPSS command:
ADD FILES to combine any or all of them into a single file.e.g:
GET FILE= 'C:\Users\John Hall\Desktop\bsa2016'.
GET FILE='C:\Users\John Hall\Desktop\bsa2017sav'.
ADD FILES file 'C:\Users\John Hall\Desktop\bsa2017.sav'
/file 'C:\Users\John Hall\Desktop\bsa2016.sav'.
SAVE OUTFILE='C:\Users\John Hall\Desktop\bsa2016_2017.sav'
/keep year sserial to rsex rage RAgeE to rearnq newrearnq rearn
SelfComp to HHincome .
The new file will contain only 1045 variables, not the full set of 11,995 in the new mother file.
which includes the 2018 data.