Solved – Grouping subject data for within-subject analysis in SPSS

repeated measuresspss

I have over 30 subjects who each did the same task about 50 times. Each of these data point can be in condition a1 or a2 of variable A or condition b1, b2, b3 or b4. So for each subject, I have datapoints for a1b1, a2b2, etc.

I have three dependent variables (v1, v2, v3) for each data point.

I understand that this is a within-subject analysis, done through a repeated measure test.

But the way I understand it, if I want to compare a1 to a2, I have to make a column for a1 with each subject's average for a1, the same for a2, and compare those two columns. And I have to do it for each dependent variable, and then again for b1-b4. And if I want to study the interaction, I have to do the same for a1b1, a2b1, a1b2, and so on, again for each dependent variable. This seems quite impractical.

As of now, my data is set with a column for subject's ID, a column for A condition, a column for B condition, a column for each dependent variable v1 v2 and v3, and a row for each data point.

Is there a way to do the repeated measure analysis as follows?

"(average of v1 when A=a1 for each subject) vs (average of v2 when A=a2 for each subjet)"

Best Answer

I think you want to restructure the data, transforming it from the long to wide format. Here's some links to tutorials (googled):

Quoted from http://kb.iu.edu/data/bbqj.html:

"The long format uses multiple rows for each observation or participant:

ID  WEIGHT  CALORIES  TIME
1   200    3500        1
1   190    3300        2
1   180    3100        3
2   160    3000        1
2   150    2900        2
2   140    2800        3

The wide format uses one row for each observation or participant:

ID  weight1 weight2 weight3 calories1 calories2 calories3
1   200      190    180       3500     3300     3100
2   160      150    140       3000     2900     2800         "

The wizard is in Data > Restructure > Restructure selected cases into variables (second option).

Once the data is in this format you can run the two-way ANOVA for repeated measures (Analyze > General Linear Model > Repeated Measures...).