Exemplar 4 - Preprocessing

The programs below are provided to allow you to see how the data were extracted from the large survey files and made ready for analysis by different packages. It is not expected that you would want to do this again, but you may find it helpful for doing similar things yourself.

For this exemplar we are not showing all of the process of extracting the data from the files at the ESRC data archive in order to protect the confidentiality of the respondents. We have notes where lines of code are omitted.

Click here for explanations of the type of procedures we have used. This means that you may not get the same answers here, to the last decimal place, as you would for the original data. But we have checked that the main conclusions would be identical.

The program to extract the data was written in SPSS and the syntax is in ex4_prep.SPS   It produces an SPSS data set ex4.sav, and an SAS transport format file ex4.xpt as well as a SAS data set ex4.sas7bdat..

The R AND Stata files are produced via a SAS export file an d are created with the following steps:-

The data sets ( in bold )  mentioned here are restricted to the variables needed for these analyses. They can all be accessed from the main page of exemplar 4.