I think it'll help if I upload a sample dataset. In this sample dataset I have the data in long form from two participants with their answers to 3 surveys: Belief in a Dangerous World (BDW), Self-Esteem (SE) and Need to Belong (NTB). The variable ____.Sample is the specific question participants answered in that survey. So BDW.SAMPLE 1 indicates it's question #1 and BDWResponse. RSP s their response to question #1, and so on.
I've used this syntax to try to average across the BDW responses, but since the variable is in long form, it just spits out the exact same number for each row for the participant, so it's not say averaging across row #11-22 (where participant #159's responses to the BDW survey are located in the SPSS file. Which makes sense that it doesn't do that, but that is essentially what I want it to do for each participant.
USE ALL.
COMPUTE BDW_Total=MEAN(BDWResponse.RESP).
EXECUTE.
I've attached my sample data set with the survey answers. Note, even with this extremely simplified dataset I still end up with extra empty variables when I restructure it. Maybe that's normal?
Thank you.
------------------------------
Heidi Blocker
------------------------------
Original Message:
Sent: Mon August 02, 2021 03:56 PM
From: Jon Peck
Subject: Process Survey Data in Long Form
You might start by deleting those useless variables. I don't know E-Prime, but I have seen similar junk from Qualtrics.
But what is wrong with using long form with the regular tools such as DESCRIPTIVES? If you need within-case means and such, look at MEAN() and such for COMPUTE. You can even use TO in their arguments.
If you need more selection in these functions, the SPSSINC SELECT VARIABLES can help.
--
Original Message:
Sent: 8/2/2021 1:41:00 PM
From: Heidi Blocker
Subject: Process Survey Data in Long Form
I've collected behavioral (reaction time) & survey data via E-Prime and have exported the data to SPSS. I have syntax to process my reaction time (RT) data: eliminate outliers, average across blocks of trials, etc. to get what I need from the RT data, but I have no idea how to work with survey data in long form. I need to be able to reverse code some questions of the survey data and take a sum or average of the questions. I've figured out a work around to reverse code the questions I need, but I cannot figure out how to take an average of the questionnaire when it is in long form.
When I try to restructure or transpose my data, I end up with 18676 variables for a single survey that has only 12 questions. I assume because of the large amount of (mostly useless) data that E-Prime has collected and exported. I'm sure I can reduce this number of variables by selecting what E-Prime exports, but I do not think this will fully solve my problem.
I can restructure my RT data, because I process it to end up with means so there's the same value for the long variable that I care about, but I don't know how to end up with the same result for my surveys.
It's been a while since I've worked with SPSS much, so forgive me if I'm missing something obvious! Let me know if more information would help answer my question.
------------------------------
Heidi Blocker
------------------------------
#SPSSStatistics