The examples in this section will use a subset of the General Social Survey from 2016 with only 28 fields out of the original 896. After downloading and opening the General Social Survey file for 2016 in the SPSS Statistics format, you can run the following code to create a file that will produce the same results shown in this chapter. Remember to change the directory reference on the second line of the SPSS code to reflect the directory on your machine where you want to have this new file saved:
* create GSS2014small with 28 fields....
* change the directory reference below as needed.
SAVE OUTFILE='C:GSS DataGSS2014sm28.sav'
/keep = happy marital hapmar age
VOTE12 PRES12 educ speduc natpark natroad NATENRGY cappun natmass natchld natsci
partyid degree incom16 satfin size spdeg polviews
rincom16 res16 childs wrkstat sex region /COMPRESSED.