Hi All –
I have a set of 398 stimuli, and had each of 500 people make a single judgment about each one of a random sample of 20 of those stimuli. So my dataset right now is in long-form, with 20 rows per person. I have a variable identifying which of one of the 398 stimuli that person was judging, and their single-number judgment of that stimuli.
So right now the datafile looks like 10000 rows of: (Sorry, I couldn't figure out how to put tabs in, so I put commas in to indicate column separators)
Participant ID, Stimuli, Rating
ID1, Stim1, 8
ID1, Stim142, 5
ID1, Stim3 , 4
… (17 more times for Participant ID1)
ID2, Stim2 , 7
ID2, Stim5 , 1
ID2, Stim90, 2
What I want to do is restructure my datafile so that I have 398 columns, one for each stimuli. I’d like to have one row per participant, and their numeric judgment for each of the 20 of those stimuli they evaluated. They would simply have missing data for each of the 376 stimuli (columns) that they did not see. So ideally it would look like this:
ParticipantID, Stim1, Stim2, Stim3, Stim4, Stim5…
ID1, 8, --, 4, --, --
ID2, --, 7, --, --, 1
Can anyone help me with what syntax I would use to do this? I believe it should involve CASES to VARS, but I am stumped about how to do it...
Many many thanks in advance for any guidance!