Analyzing Data
SPSS Resources 1. See website (readings) for SPSS tutorial & Stats handout Don t have your own copy of SPSS? 1. Use the libraries to analyze your data 2. Download a trial version of SPSS from the website: hep://www.spss.com/downloads/papers.cfm? ProductID=00035&Name=SPSS_Base&DLType=Demo
Note Most of you WON T get significant results It s totally fine for you to report null findings!
Learning ObjecXves 1. Import from excel 2. Add labels to one variable 3. Recode into a new variable (add values) 4. Get descrip:ves of all your conxnuous vars, inspect the min/max 5. Select cases to look at means separately 6. Get frequencies of your condixon variable plus one demographic variable 6. Conduct a t test using condixon as your iv 7. Conduct an analysis of variance (ANOVA) with condixon and a categorical demographic variable as your ivs; include a plot
Learning ObjecXves 8. Finding scale reliabili:es 9. Compu:ng variables 10. Redo one of the above steps but save to syntax and run it (* for annotaxon) 11. Note you can save SPSS output in a word document
Open SPSS by going to Start > All Programs
User Interface
ImporXng from Excel* Open an exisxng data source by clicking Okay (or click cancel and go to File > Open) Navigate to Excel file (file must be closed and saved down not compaxble with Office 2007) use drop down to select.xls files Select tospss worksheet and import
User Interface
Three windows in SPSS* 1. Main window what you see now Data View rows of data, like excel; one subject per row Variable View where you see and edit informaxon about your variables; one variable per row 2. Output window aler you run an analysis 3. Syntax recording analyses
Prepping data in SPSS
Labeling variable names In Variable view: go to the Label column and type more descripxve name
Labeling variable values* In Variable view: label gender values with male and female Click on grey box in Values column Enter M for Value and Male for Label; repeat for Female In Data View: View > Value Labels
Recoding Variables* To group parxcipants together based on their answers, you need to recode their answers Transform > Recode > Into Different Variables Highlight year move it into the box Type year_r in Name > Change
Click on Old and New Values In Old Value, type Freshman In New Value, type 1 Click Add Repeat for Sophomore (1), Junior (2), and Senior (2) Recoding Variables*
Recoding Variables In Data View, scroll over to the right and you will see your new variable How would you label the values so you know what 1 and 2 means?
Assessing reliability* To figure out if two+ dvs hang together, select Analyze > Scale > Reliability Analysis In Items, enter the variables you would like to collapse across Click Sta:s:cs and check the Scale if Item Deleted box
Recoding Variables Fit in computer science was rated by three quesxons, how similar they are to computer scienxsts, how much they belong in computer science and how much they fit in computer science, all on a scale from 1 (not at all) to 7 (extremely) (α =.92).
CompuXng new variables* To do computaxon involving one or more variables, select Transform > Compute In Target Variable, type new variable name (weightedgpa) In Numeric Expression, type computaxon (MEAN(curentgpa, majorgpa)
SelecXng subjects* Data > Select Cases > Click If
SelecXng subjects* In box, type the criteria you want (gender = M ) Use Boolean logic (&,, ~=, ANY()) String variables needs quotes around their values To select everyone, go back to Data > Select Cases and select All Cases
Analyzing data in SPSS
Descrip:ve Sta:s:cs* Describe the characterisxcs of individual variables Frequencies for categorical* variables Analyze > Descrip:ve Sta:s:cs > Frequencies Means and standard deviaxon for conxnuous* variables Analyze > Descrip:ve Sta:s:cs > Descrip:ves How would you find out how many males and females you have? How would you find out the average number of programming classes taken by your sample? *Other names you might have heard: ConXnuous = Interval; Categorical = Discrete
What Test to Use What kind of DV? * ConXnuous Categorical What kind of IV(s)? What kind of IV(s)? ConXnuous Categorical ConXnuous Categorical # of IVs? # of IVs? Logis:c regression Chi squared test One Two + One Two + Correla:on Regression Levels of IV? Within subjects or between subjects? Two Three + ANOVA (GLM Univariate) ANOVA (GLM Repeated Measures) Within subjects or between subjects? One way ANOVA Paired samples t test Independent samples t test
Output Window Output gets added to the file can select and delete unnecessary output Save your output
CorrelaXon A Pearson correlaxon computes relaxonships between conxnuous variables
CorrelaXon* Analyze > Correlate > Bivariate Can enter several variables to get a matrix of relaxonships
CorrelaXon* if the p value ( Sig. ) is less than.05, then the relaxonship between the two are significant likelycs progclasses Correlations Pearson Correlation Sig. (2-tailed) N Pearson Correlation Sig. (2-tailed) N likelycs progclasses 1.957*.011 5 5.957* 1.011 5 5 *. Correlation is significant at the 0.05 level (2-tailed). There is a posixve correlaxon between number of programming classes and reported likelihood of majoring in computer science, r(5) =.96, p <.05.
T test* A t test compares the means of two groups to each other Analyze > Compare Means > Independent samples t test Which gender reports being more likely to major in computer science?
T test* Click on Define Groups and put M and F in Groups 1 and 2
T test* Women and men report being equally likely to major in computer science, t(3) = 1.63, ns.
2 x 2 ANOVA* A 2 x 2 ANOVA allows you to assess how two independent variables interact to impact a dependent variable InteracXon of gender and environment : The influence of one independent variable (environment) was different each value of the other independent variable (men and women)
2 x 2 ANOVA* Analyze > General Linear Model > Univariate How do gender, year in school, and their interacxon affect GPA?
2 x 2 ANOVA* Click on Plots Gender in horizontal axis Year_r as separate lines Click Add
2 x 2 ANOVA* Click on Plots Gender * Year_r interacxon not significant Dependent Variable: currentgpa Source Corrected Model Intercept gender year_r gender * year_r Error Total Corrected Total Tests of Between-Subjects Effects Type III Sum of Squares df Mean Square F Sig..567 a 3.189.771.662 45.721 1 45.721 186.615.047.058 1.058.236.712.446 1.446 1.822.406.006 1.006.026.898.245 1.245 53.300 5.812 4 a. R Squared =.698 (Adjusted R Squared = -.207) Estimated Marginal Means 3.6 3.4 3.2 3.0 2.8 Estimated Marginal Means of currentgpa year_r 1.00 2.00 2.6 Female gender Male
Using SPSS syntax Allows you to save your code for future use In SPSS dialog boxes, click Paste instead of OK Select and hit Cntrl R to run syntax Use * to comment out end comments with a.
CongratulaXons! You have learned how to Label variables and their values Recode and compute new variables Obtain frequencies and other descripxve staxsxcs Run a correlaxon Run a t test Run a 2 x 2 ANOVA Use syntax