Introduction to SPSS (Version 14) for Windows s1
Total Page:16
File Type:pdf, Size:1020Kb
Introduction to SPSS (version 14) for Windows
Aims and Learning Objectives
This goals of lab two are to: Import data from Excel. Look at basic descriptive statistics. Compute coefficient alpha reliability estimates. Computing a scale score (average). Examine the correlations between items. Learn what makes you happy (or unhappy)! SPSS Lab 3 Psychology 436
Contents
Document information
Task 1 Opening/Preparing Excel Data...... 1 Task 2 Reading Data into SPSS...... 2 Task 3 Formatting and Saving the SPSS Data File...... 3 Task 4 Loading Variable Labels...... 4 Task 5 Descriptive Statistics...... 5 Task 6 Can we make a mood scale?...... 7 Task 7 Examine the Output...... 8 Task 8 Compute Scale Scores...... 9 Task 9 Compute Correlations among Variables...... 10 SPSS Lab 3 Psychology 436
Task 1 Opening/Preparing Excel Data
Comments Before we can analyze your mood data in SPSS, we have to do some data prep in Excel first. This will entail removing the spreadsheet protections that are in place and getting rid of the first row of headers in Excel
1.1 Load Excel file data onto the computer’s desktop or some other directory. 1.2 Open the Excel data file 1.3 On the Excel Tools Menu. Protections / Unprotect Workbook. 1.4 On the Excel Tools Menu. Protections / Unprotect Sheet. 1.5 Next click on the row number 1 on the left hand side of the page. This should select the entire first row (the headers such as “agreement items”). 1.6 Right-click the row number 1 and select Delete. 1.7 In cell A1, type “Date” 1.8 In cell B1, type “Weekday” Comments The next step is to get rid of any text that might be present in the data. If you used NA to indicate a variable was not relevant for you, we need to change NA to blanks. 1.9 On the Edit menu, choose Replace. 1.10 On the pop-up replace window, type NA in the Find What: field. Leave the Replace With: field blank. Click Replace All. 1.11 On the File menu, choose Save As and save the workbook as Lab 3 data.xls. Be sure to pay attention to where on the computer you are saving this. 1.12 Close the Excel file SPSS Lab 3 Psychology 436
Task 2 Reading Data into SPSS
1.13 Open SPSS from the Start Menu. 1.14 When the “What would you like to do?” window pops up, hit OK to choose “Open an Existing Data Source” 1.15 On the “Open File” pop-up window, select Files of Type and choose Excel (*.xls)
1.16 Chose Lab 3 data.xls On the “Opening Excel Data Source” window, be sure “Read variable names from the first row of data” box is checked & click OK. SPSS Lab 3 Psychology 436
Task 3 Formatting and Saving the SPSS Data File
Comments You might notice the SPSS file looks a bit squirrelly. We need to format and label our variables. Some of this you will do using the tools I showed you earlier. However, for other parts, I have taken the liberty of writing a syntax file that does this for you.
1.17 On the data view tab, scroll to the bottom of your data file. If you see a few rows populated only by dots, select these rows and hit the delete button on the keyboard to get rid of them. 1.18 Click on the Variable View Tab 1.19 Set the number of columns for the weekday variable to 8. 1.20 Set the number of columns for the Date variable to 12. 1.21 Set the Width property of all of the other variables to 8. The easiest way to do this is to change this property to 8 for a single variable, then select that cell and hit Ctl-C to copy. Next, highlight the Width column for all of the other variables and hit Ctl-P to paste. 1.22 Set the Decimals property of I1 to I19 to 0 (using the same copy and paste technique). 1.23 Set the Decimals property of I20 to I27 to 2. 1.24 Set the properties of your personal items as you see fit. 1.25 Change the Measure attribute for I1 to I34 to Ordinal. 1.26 Choose “File / Save As”. 1.27 In the pop-up window, give the file the name “Lab 3 Data” and be sure SPSS (*.sav) is selected as the file type. 1.28 Click Save. SPSS Lab 3 Psychology 436
Task 4 Loading Variable Labels
Comments A syntax file is a list of commands that looks a bit like computer programming code. These commands are run by SPSS and serve the same functions as the SPSS menus. In fact, syntax is far older than the SPSS windows interface. Back in the day, if you were using SPSS, you were writing this code and submitting it to a main- frame computer somewhere. Your only user interface was a blinking cursor command line. SPSS has come a long way.
1.29 Download the syntax file from: http://courses.ncsu.edu/psy436/lec/001/Lab/Lab3.SPS 1.30 Save this file to the same directory that your data file is located in. 1.31 On the File menu, click Open then Syntax. 1.32 Navigate to the directory where you save the file. 1.33 Select Lab3.sps and click Open 1.34 From the syntax file window, click on Run and select All
1.35 Close the syntax file. 1.36 Save your SPSS data file now that variable and value labels have been assigned. SPSS Lab 3 Psychology 436
Task 5 Descriptive Statistics
Comments Now lets take a look at some basic descriptive statistic information.
1.37 Let’s compute basic frequency statistics on all of your variables. 1.38 On the Analyze menu, choose Descriptive Statistics and Frequencies 1.39 Select all variables from Weekday on down and hit the right arrow.
1.40 Click on Statistics 1.41 Choose any statistics you would like, such as: SPSS Lab 3 Psychology 436
1.42 Click on Continue 1.43 Click on Charts 1.44 Choose Bart Charts and Percentages
1.45 Click Continue 1.46 Click OK 1.47 Inspect your results! If you are introverted, you might find something like this:
Enjoyed Time with others
40
30 t n e c r 20 e P
10
0 Strongly Disagree Somewhat Neither A nor D Somewhat Strongly Agree Disagree Disagree Agree Enjoyed Time with others
1.48 Save your output file as Lab 3.spo SPSS Lab 3 Psychology 436
Task 6 Can we make a mood scale?
Comments Let’s compute reliability estimates on our three mood items to see if we can combine them into a single scale.
1.49 From the Analyze Menu, select Scale, then Reliability Analysis…
1.50 In the pop-up window, select I2, I3, and I4, then click the arrow to put these items into the Items window on the right. 1.51 Verify that Alpha appears in the Model window (it always will). 1.52 In the Scale Label field, write in the name of the scale as “Mood”. 1.53 Click the “Statistics…” box and look at the pop-up window. 1.54 Select the statistics as indicated in the figure below and click Continue:
1.55 Click OK to run the analyses SPSS Lab 3 Psychology 436
Task 7 Examine the Output
1.56 Take a look at the alpha level. It should look like the below: Reliability Statistics
Cronbach's Alpha Based on Cronbach's Standardized Alpha Items N of Items .946 .949 3
Comments Note, I found a really high alpha and correlations, but you may not since you are analyzing different data. SPSS Lab 3 Psychology 436
Task 8 Compute Scale Scores
Comments Now that we have determined that these items make a viable scale, let’s compute a scale score for them.
Scale scores are just like test scores – they summarize performance or responses across items. In this case, we will simply take the average of the item responses in order to compute the scale scores. We could also take the sum, but when different scales have different numbers of items, it makes it difficult to compare means and standard deviations across scales.
1.57 Under the Transform menu, choose Compute. 1.58 In the Target Variable box, type “MoodScale”. 1.59 Under the Function Group choose Statistical. 1.60 Under Functions and Special Variables, choose Mean and click the up arrow to move it into the Numeric Expression box. 1.61 Highlight the first question mark in the Numeric Expression box. 1.62 Choose I2 (Felt Great) item and hit the right arrow to replace the question mark with I2. 1.63 Highlight the second question mark in the Numeric Expression box. 1.64 Choose the I3 and hit the right arrow to replace the question mark with I3. 1.65 Manually type a comma after I3, then choose I4 and move it to the Numeric Expression Box. 1.66 Click OK 1.67 Save your SPSS data file SPSS Lab 3 Psychology 436
Task 9 Compute Correlations among Variables
Let’s see how the variables relate to one another. 1.68 From the Analyze menu, select Correlate, then Bivariate. 1.69 Select all variables present other than Date 1.70 Click OK. Comments Look unwieldy? Want something a little more simple? Proceed below. 1.71 From the Analyze menu, select Correlate, then Bivariate. 1.72 Select all variables present other than Date (these should already be selected). 1.73 Now click Paste 1.74 A new syntax window should open that looks something like this:
Comments We are going to use the syntax command option “WITH” to re-organize our output a bit. As far as I know, this can’t be done without using syntax in SPSS. 1.75 In the syntax file, before the word “MoodScale”, insert the word “WITH”. 1.76 Cut and paste I1 after the word “MoodScale”. 1.77 Delete I2, I3, and I4 from the syntax file 1.78 I’ve re-organized a bit (you can enter returns and tabs as you want without affecting the syntax), but your file should look like this: SPSS Lab 3 Psychology 436
Comments Positive correlations indicate that the variable was associated with a good (or better) mood while negative correlations indicate that variable associated with worse moods. Remember though that correlation does not imply causation and that many of the variables here are strongly correlated with one another. 1.79 Save your output file and e-mail to yourself or play around with your data as you see fit. 1.80 We will take a look at the class data as a whole next week and talk about some of the results then.