The2abraxis

10+ Year Member
Jun 3, 2008
129
0
Orlando Florida
Status
Psychology Student
I dont know if this is the best place to put this, but it is worth a shot:

I have been working on something in that has 8 columns (1-8) for my independent variable and I want to do an ANOVA with these 8 levels.

From what I have learned, to do an ANOVA (one way), you need a grouping variable, so that means having 2 columns; one for the grouping variable (in this case, 1-8) which is called "factor", and one for the dependent variable, which is called "dependent" in the program.

So at first I didn't mind rearranging my 8 columns into a grouping variable column and score column, but now that I have over 100 entries for each, it gets a little time consuming.

I was wondering if there was a way to either group the 8 columns w/o moving them, or if there is a feature that can put the 8 into the designated 2 columns.

Thanks!
 

airmont

10+ Year Member
5+ Year Member
Jan 24, 2008
47
0
New Jersey
Status
Psychology Student
I assume you mean that there were eight groups, and each column represent a yes or no for membership in each. You can recode this data into a single column with each group assigned to a number 1 - 8 using spss syntax:

1) Open new syntax file
2) Enter the following, replacing "columnX" with the name of each respective column:
DO IF (column1 = 1) .
COMPUTE group = 1.
ELSE IF (column2 = 1).
COMPUTE group = 2 .
.....[repeat for each column]....
ELSE IF (column8 = 1) .
COMPUTE group = 8.
END IF.
EXECUTE
3)Run all

This code assumes you can only be a member of one group, and that the data was entered correctly. You could check for error using a more complicated syntax. Good luck!
 

The2abraxis

10+ Year Member
Jun 3, 2008
129
0
Orlando Florida
Status
Psychology Student
i think we are off in the format. This is what I have now:

Treatment1 Treatment2 Treatment3 Treatment4 (all the way to 8)
6 4 5 1
6 6 7 2
5 3 2 3
2 9 1 4
3 8 0 5
1 11 12 6

(a 8x100= 8 columns, 100 rows)

and to do an ANOVA, I need it in this format:

Treatment Score
1 1
1 2
1 3
1 4
1 5
2 6
2 7
2 8
2 9
2 1
3 9
3 8
3 7
3 6
3 5

(a 2x800= 2 columns, 800 rows)

is there a way I can switch the formats besides doing it by manually??

edit- the tables are a little messed up, but its ok :)
 
Last edited:
About the Ads

psydd

10+ Year Member
Oct 12, 2008
64
0
New York City
Status
Pre-Psychology
in class we were always made to do it manually. but i don't know if that's because we were new to SPSS and my professor wanted us to understand the process, or if the program itself really just can't do that.
 

JockNerd

10+ Year Member
5+ Year Member
Mar 28, 2007
1,810
9
Status
Psychology Student
I'd love to help, but I can't grok what the op is asking.

Are you testing for differences between 8 types of treatment? Why are there values for treatments 1-8 across each row? That makes it look like each person had each of the 8 treatments.
 
About the Ads