
Here are three extremely short answers, just too show you what anes.sav looks like: GET FILE = "anes.sav". Let’s now combine the three files into one: GET FILE = "anes_1.sav". The macro expects two !POSITIONAL arguments, each consisting of a single token: the name of the worksheet ( !1 inside the macro), and a digit (1, 2 or 3 – !2 inside the macro) for the names of the file ( anes_1, anes_2, anes_3) and the variable ( problem1, problem2, problem3). But since I want this post to be instructive, I wrap the syntax into a macro and call it three times: DEFINE !getAnes(!POS = !TOKENS(1) /!POS = !TOKENS(1)) Repeat for the next two sheets, V202207 and V202209. before a transformation) MISSING(respondent) remains true for all records. N.B.: In my version of pspp the EXECUTE is needed because without it (i.e. The downsides are that the first column becomes a string variable and that the first row (case) must be discarded.

I used the READNAMES=OFF option because I prefer the predictable names VAR001 and VAR002 over V200001 and V202205_POST_Most_important_problems_facing_the_country_men. + COMPUTE respondent = NUMBER(VAR001, F6.0). OK let’s import the first sheet: GET DATA I told you the file was interesting! The next 2 sheets are for mention 2 and mention 3 (the last sheet, which we will ignore, is for the single most important problem). The workbook has a lot of sheets the last 4 are dedicated to the question what the respondent considers the most important problems facing the United States. Open the file with LibreOffice or Excel and save as Open Document Spreadsheet.
Sample pspp syntax download#
In the AUXILIARY FILES panel you can download Redacted Open-Ends as an Excel file.

The survey data are readily available in SPSS format, but here we will be looking at text responses only.
Sample pspp syntax plus#
On the plus side, the data set I decided to use here is very interesting: the ANES 2020 Time Series Study. I have had difficulties in finding public datasets with answers to open ended questions. Coding by hand is no longer an option – enter mass coding! And then came tweets and reviews and other big data. Then came telephone interviews, and web questionnaires, and sample sizes got bigger and bigger.
Sample pspp syntax code#
If an answer to the question “ Why do you prefer that shop?” was “ Good service, just around the corner and not too expensive“, you would assign codes 2 and 1 to that respondent’s answer, and maybe 19 or another code if suitable.Ĭoding was handcraft precision work in the era of qualitative research, and invariably half way through the coding process you would realize the list of codes was inadequate and start all over again. You read a sample of these responses to decide on a list of codes, like In my career (so to speak) in marketing research I have done a lot of coding of responses to open ended questions.
