Dismiss Notice
Hey Texans—join us for a DFW meetup! Click here to learn more.

SPSS question

Discussion in 'Psychology [Psy.D. / Ph.D.]' started by The2abraxis, Dec 23, 2008.

  1. The2abraxis

    2+ Year Member

    Joined:
    Jun 3, 2008
    Messages:
    129
    Likes Received:
    0
    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!
     
  2. Note: SDN Members do not see this ad.

  3. airmont

    5+ Year Member

    Joined:
    Jan 24, 2008
    Messages:
    47
    Likes Received:
    0
    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!
     
  4. The2abraxis

    2+ Year Member

    Joined:
    Jun 3, 2008
    Messages:
    129
    Likes Received:
    0
    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 :)
     
    #3 The2abraxis, Dec 24, 2008
    Last edited: Dec 24, 2008
  5. psydd

    2+ Year Member

    Joined:
    Oct 12, 2008
    Messages:
    64
    Likes Received:
    0
    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.
     
  6. JockNerd

    5+ Year Member

    Joined:
    Mar 28, 2007
    Messages:
    1,810
    Likes Received:
    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.
     
  7. The2abraxis

    2+ Year Member

    Joined:
    Jun 3, 2008
    Messages:
    129
    Likes Received:
    0
    Status:
    Psychology Student
    actually i got it now. apparently there is a feature in DATA that says Restructure, so that helped out :-D
     

Share This Page