SPSS Lab 4 Aims and Learning Objectives This goals of lab two are to: Import data from text. Look at basic descriptive statistics. Run a factor analysis Interpret the output Compute coefficient alpha reliability estimates. Computing scale scores (averages). Examine the correlations between scales and criteria variables. Learn what makes you happy (or unhappy)! SPSS Lab 4 Psychology 436 Contents Document information Task 1 Reading Data into SPSS ........................................................................ 2 Task 2 Labelling and Reorganizing the Data File ............................................. 4 Task 3 Changing the Options in SPSS ............................................................. 5 Task 4 Descriptive Statistics ............................................................................. 6 Task 5 Recode the Reverse Coded Items in the Database .............................. 7 Task 6 Factor Analysis of All Four Scales ........................................................ 9 Task 7 Investigate Output ................................................................................ 12 Task 8 Re-Analysis of All Four Scales w/ 7 Factors ...................................... 14 Task 9 Investigate Output of 7 Factor Solution .............................................. 15 Task 10 Re-Analysis of All Four Scales – 5 Factors ........................................ 19 Task 11 Interpret Output .................................................................................... 20 Task 12 Reliability Analysis – Smoking Scale.................................................. 24 Task 13 Examine the Output ............................................................................. 26 Task 14 Factor Analyze the Criterion Data (with Factor 5 Items) .................... 27 Task 15 Recode Necessary Items from Criterion Scales................................. 29 Task 16 Compute Scale Scores......................................................................... 30 Task 17 Compute Correlations among Variables............................................. 31 SPSS Lab 4 Psychology 436 Task 1 Reading Data into SPSS Comments Before we can analyze your mood data in SPSS, we have to import this from a text file containing the data. 1.1 Open SPSS from the Start Menu. 1.2 When the “What would you like to do?” window pops up, hit OK to choose “Open an Existing Data Source” 1.3 On the “Open File” pop-up window, select Files of Type and choose Data (*.dat) 1.4 Chose Project.dat On the “Open File” window. 1.5 The Text Import Wizard will open. Click next to indicate that your text file does not match a predefined type. 1.6 On Step 2, choose Delimited for variable arrangement and choose Yes for variable names located at the top of the file. SPSS Lab 4 Psychology 436 1.7 On Step 3, leave the defaults alone and click Next. 1.8 On Step 4, uncheck Space so that Tab is the only option checked. 1.9 On Step 5, leave things alone and click Next. 1.10 On Step 6, click Finish. 1.11 Now save the SPSS dataset as Project.sav on the File/Save As menu. SPSS Lab 4 Psychology 436 Task 2 Labelling and Reorganizing the Data File Comments As before, I have taken the liberty of writing a syntax file that labels the variables for you. This will greatly aid in interpreting your factor analysis output later. Also, I have inserted code to better organize the variables. 2.1 Download the syntax file from: http://courses.ncsu.edu/psy436/lec/001/Lab/Lab4.SPS 2.2 Save this file to the same directory that your data file is located in. 2.3 On the File menu, click Open then Syntax. 2.4 Navigate to the directory where you save the file. 2.5 Select Lab4.sps and click Open 2.6 From the syntax file window, click on Run and select All 2.7 Close the syntax file. 2.8 Save your SPSS data file now that variable and value labels have been assigned. 2.9 Save your SPSS Data file to save these changes. SPSS Lab 4 Psychology 436 Task 3 Changing the Options in SPSS Comments In order to make variable selection easier for the factor analyses, you should change your default options in SPSS. 3.1 Under the Edit Menu, select Options. 3.2 Under the General tab, select Display names in the Variable Lists section. 3.3 Go to the Output Labels tab and select Names and Labels for all. 3.4 Click OK. SPSS Lab 4 Psychology 436 Task 4 Descriptive Statistics Comments Now lets take a look at some basic descriptive statistic information. 4.1 Let’s compute basic frequency statistics on all of your variables. 4.2 On the Analyze menu, choose Descriptive Statistics and Frequencies 4.3 Select all variables except Date and hit the right arrow. 4.4 Click on Statistics 4.5 Choose any statistics you would like, such as: 4.6 Click on Continue 4.7 Click on Charts 4.8 Choose Bart Charts and Percentages 4.9 Click Continue 4.10 Click OK SPSS Lab 4 Psychology 436 Task 5 Recode the Reverse Coded Items in the Database Comments Reverse coding means to “flip” the response scale. 5.1 From the Transform menu, choose Into Same Variable 5.2 Select the following items click the right arrow: S1, S7, S9, S10, S11 R1, R4, R6 WT4, WT6, WT10. 5.3 Click Old and New Values 5.4 Under Old Value, type 5. Under New Value, type 1 and click Add. 5.5 Repeat this with the old value of 4 and new value of 2. 5.6 Do this twice more, making old values of 2 new values of 4 and old values of 1 equal to new values of 5. Click Add each time. You should get the below. 5.7 Click Continue 5.8 Click OK. Comments 5.9 Note that your data values have changed even though you wouldn’t be able to tell this just by looking at the data themselves. It’s a good idea to save your file as a new filename at this point. Save the file as ‘Project2.sav’ before continuing. SPSS Lab 4 Psychology 436 Factor Analysis Steps 1. Select variables for analysis 2. Determine number of factors to retain i. Look at Scree plot, variance accounted for, and interpretability of factor analytic solution ii. Finalize number of factors to keep 3. Interpret factor loadings / factors 4. Delete items not loading onto any factor Other steps 1. Run Reliability Analysis on each scale separately i. Delete items that, when deleted, would raise the alpha value by .02 or more. 2. Compute scale scores as the average of ONLY the items kept after all analyses 3. Correlate these scale scores with criterion scale scores (or items). SPSS Lab 4 Psychology 436 Task 6 Factor Analysis of All Four Scales Comments We will now look at the factor analytic results based on all four scales that the class developed. Since we expect 4 factors to result, we will first force a solution with four factors. However, we will request that a scree plot be printed, then we will re-run the solution specifying a solution with as many factors as indicated by the scree plot. 6.1 Choose Analyze / Data Reduction / Factor 6.2 Select variables S1 all the way down to WT11 and click the right arrow. Note, you should be analyzing all of the scale variables that the class developed, but not the criterion variables (ones beginning with ‘C’). 6.3 Click on the Extraction button 6.4 Select Principal Axis Factoring from the drop-down menu 6.5 On this same screen, select Scree Plot 6.6 Under Extract, set the Number of factors: to 4 SPSS Lab 4 Psychology 436 6.7 Click Continue 6.8 Click the Rotation button 6.9 Click on Direct Oblimin 6.10 Click Continue 6.11 Click the Options button 6.12 Click the Sorted by size box 6.13 Click the Suppress absolute values less than: box 6.14 Enter .4 into this box. SPSS Lab 4 Psychology 436 6.15 Click Continue. 6.16 Click OK. SPSS Lab 4 Psychology 436 Task 7 Investigate Output Comments Now it’s time to look at the output. The first thing to examine is whether or not 4 appears to be the appropriate number of factors to extract. Comments Note that the analyses appearing below will not match your results as they were performed on an earlier (smaller) version of the data set. 7.1 Let’s first take a look at the Total Variance Explained table. Total Variance Explained Rotation Sums of Squared Loadings(a) Initial Eigenvalues Factor 1 Total % of Variance Cumulative % 6.718 14.929 14.929 Total 4.692 2 4.678 10.396 25.324 4.382 3 3.812 8.471 33.796 4.121 4 3.126 6.946 40.742 3.798 5 2.122 4.715 45.457 6 1.864 4.143 49.600 7 1.707 3.794 53.394 8 1.473 3.273 56.667 9 1.389 3.087 59.754 10 1.312 2.916 62.670 11 1.180 2.623 65.293 12 1.069 2.375 67.668 13 1.047 2.326 69.993 14 1.013 2.251 72.244 …. Comments 7.2 In total 14 (!) factors had an eigenvalue greater than 1.0. This is way more than would be interpretable. For this reason, many authors have recommended against using this criterion to determine the number of factors to retain. Let’s ignore these results and look instead at the scree plot. SPSS Lab 4 Psychology 436 Scree Plot 7 6 Eigenvalue 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 Factor Number 7.3 As you can see, 4 factors emerge as clearly dominant. However, it appears as though 3 additional factors MAY be viable. 7.4 The next step is to re-run the analyses with 7 factors to see if that solution is interpretable. SPSS Lab 4 Psychology 436 Task 8 Re-Analysis of All Four Scales w/ 7 Factors Objectives We are still trying to determine the correct number of factors to retain in our analyses. We have not yet reached a decision. The scree plot suggested either 4 or 7 factors. We’ll run and examine the 7 factor output first, then backtrack to examine the 4 factor output. You won’t use any of this in your project, this part of the lab is for educational purposes only. Comments Note that your specifics of factor extraction, rotation, and options will still be saved unless you have (inexplicably) closed SPSS. You will not need to repeat all of the steps from earlier. 8.1 Click on Choose Analyze / Data Reduction / Factor 8.2 Click on the Extraction button 8.3 Under Extract, set the Number of factors: to 7 8.4 Click Continue 8.5 Click OK SPSS Lab 4 Psychology 436 Task 9 Investigate Output of 7 Factor Solution Comments Now it’s time to look at the output. Comments Note that the analyses appearing below will not match your results as they were performed on an earlier (smaller) version of the data set. 9.1 Let’s jump strait to the interpretation this time. Go to the “Pattern Matrix”. These are your factor loadings. They are sorted by decreasing order of magnitude such that the highest loadings are the strongest indicators of that factor. 9.2 Loadings lower than .4 are trivial and are omitted for clarity. 9.3 Ignore whether the loadings are positive or negative. The absolute value of the loadings is the important thing to look at. Pattern Matrix(a) Factor 1 S3 I don't mind if people smoke in my presence .834 S7 Smoking should be banned from all public places .768 S1 Smoking in public is disrespectful .763 S5 It is okay to smoke around pets .662 S2 I will sit in the smoking section of a restaurant to avoid a long wait .608 S4 People should be able to smoke anywhere they want to .590 S11 Designated smoking areas are the only place people should smoke .546 S8 It is okay to smoke around children .506 S10 If a close friend or family member smoked, I would encourage them to quit .432 WT2 I believe that military deployment in other foreign countries has made the United States safer from terrorist attacks. WT11 I believe that the U.S. needs to increase military presence in foreign countries fight the war on terror more efficiently. 2 -.772 -.729 3 4 5 6 7 SPSS Lab 4 WT9 I believe the loss of life experienced by the U.S. Armed Forces in pursuit of the War on Terror is sufficiently justified by the end goal. WT7 I believe the United States has the authority to act preemptively in other countries if the security of America is threatened. WT1 I believe the U.S. has the authority to employ whatever means necessary to extract information from those deemed enemy combatants. WT8 I believe the amount of money forecasted for spending in regards to the Iraq war is inconsequential in comparison to stabilizing the country under a democracy. WT3 I believe that the War on Terror requires more economic and resource allocation consideration. Psychology 436 -.728 -.702 -.645 -.545 -.526 WT6 I believe the costs and loss of resources in sustaining the War on Terror should be a primary concern for the U.S. lawmakers. O9 My binders are neatly arranged with dividers .695 O7 I need my closet to be organized in an orderly fashion .675 O11 My drawers are well arranged .667 O6 I use a planner to organize all my appointments .643 O8 My home is very organized most of the time .642 O2 I become anxious if my surroundings are not organized .607 O5 I use labels in order to organize my affairs .528 O4 Everything has to have a set place .408 O1 I like to plan out my day the night before O10 I prefer an organized space to do work SPSS Lab 4 R2 I am accepting of what others think about religious topics, even when they are not what I believe. R7 I believe there is a Higher Power who has many different names according to various religions. Psychology 436 .640 .614 R12 I would like to learn more about religious beliefs that are different than mine. .606 S6 If someone near me was smoking and it was bothering me, I would just move .498 R8 I would vote for laws that would protect the rights of diverse religious practices. .477 R6 People who have religions that are different than mine are ignorant of the truth. .441 R10 I believe that religious tolerance is important. .428 R11 I have several good friends who are atheists or have different religious beliefs other than my own. R1 I attend my place of worship (church/synagogue/temple) and practice the beliefs of my religion on a regular basis. -.828 R5 I do not consider myself a religious person. -.624 R4 I believe there is only one religion and that other beliefs are not worth discussing. -.508 R9 I feel that it is inconsiderate to share my religious beliefs with people who have not asked me. R3 People with religious beliefs and practices different than mine are acceptable to me as long as they can live peacefully with others and obey the rules of society. S9 I am aware that smoking bothers some people -.494 SPSS Lab 4 Psychology 436 WT10 I believe resources gathered for the purposes of maintaining the War on Terror require a greater amount of oversight in allocation/spending. WT5 I believe that changes and or additions to our foreign policy would make the war on terror more successful. .631 .517 O3 I turn in all my assignments on time WT4 I believe the U.S. should focus more on domestic problems rather than foreign issues. Extraction Method: Principal Axis Factoring. Rotation Method: Oblimin with Kaiser Normalization. a Rotation converged in 20 iterations. 9.4 As you can see, the first four factors come out cleanly as our four intended factors. However, some items do not load (are not indicators of) the factors which they were intended to measure. 9.5 Interestingly, factors 4 and 5 show that respondents see the Religiousness items as measuring two things, not one. 9.6 To label Factor 4, look at the items that load the highest on the factor. This appears to be “Religious tolerance” 9.7 Factor 5, on the other hand, appears to be “Religiosity” or how religious the respondent is. 9.8 Respondents see these as different things! 9.9 Never fear, we will use the items in Factor 4 as our measure of tolerance and those in ‘Factor 5’ as an outcome variable later. 9.10 Notice that Factor 7 doesn’t have any items with significant loadings. Thus, it is a junk factor and should be omitted. 9.11 Factor 6 includes only a couple of items with small loadings and should be deleted too. 9.12 Now, we have settled on 5 factors for our solution! We need to run the analysis again, specifying 5 factors. 9.13 We will interpret the 5 factor solution, not the one presented above! SPSS Lab 4 Psychology 436 Task 10 Re-Analysis of All Four Scales – 5 Factors Comments Note that your specifics of factor extraction, rotation, and options will still be saved unless you have (inexplicably) closed SPSS. You will not need to repeat all of the steps from earlier. 10.1 Click on Choose Analyze / Data Reduction / Factor 10.2 Click on the Extraction button 10.3 Under Extract, set the Number of factors: to 5 10.4 Click Continue 10.5 Click OK SPSS Lab 4 Psychology 436 Task 11 Interpret Output Objectives Look at factor loadings to figure out which items to keep, which to pitch Comments Again we will look at the Pattern Matrix 11.1 Take a look at the 5 factor output. Specifically the Factor Pattern Matrix (again, your results will look different). Pattern Matrix(a) Factor 1 S3 I don’t mind if people smoke in my presence -.869 S7 Smoking should be banned from all public places -.767 S1 Smoking in public is disrespectful -.743 S4 People should be able to smoke anywhere they want to -.678 S5 It is okay to smoke around pets -.657 S11 Designated smoking areas are the only place people should smoke -.603 S2 I will sit in the smoking section of a restaurant to avoid a long wait -.575 S10 If a close friend or family member smoked, I would encourage them to quit -.506 S8 It is okay to smoke around children -.427 2 WT10 I believe resources gathered for the purposes of maintaining the War on Terror require a greater amount of oversight in allocation/spending. R2 I am accepting of what others think about religious topics, even when they are not what I believe. -.679 R7 I believe there is a Higher Power who has many different names according to various religions. -.649 3 4 5 SPSS Lab 4 R6 People who have religions that are different than mine are ignorant of the truth. Psychology 436 -.601 R12 I would like to learn more about religious beliefs that are different than mine. -.560 R10 I believe that religious tolerance is important. -.511 R8 I would vote for laws that would protect the rights of diverse religious practices. -.503 R4 I believe there is only one religion and that other beliefs are not worth discussing. -.474 S6 If someone near me was smoking and it was bothering me, I would just move R11 I have several good friends who are atheists or have different religious beliefs other than my own. WT5 I believe that changes and or additions to our foreign policy would make the war on terror more successful. O11 My drawers are well arranged .716 O9 My binders are neatly arranged with dividers .711 O8 My home is very organized most of the time .680 O2 I become anxious if my surroundings are not organized .663 O6 I use a planner to organize all my appointments .646 O7 I need my closet to be organized in an orderly fashion .599 O5 I use labels in order to organize my affairs .555 O1 I like to plan out my day the night before .482 O4 Everything has to have a set place .423 O10 I prefer an organized space to do work .403 O3 I turn in all my assignments on time SPSS Lab 4 WT2 I believe that military deployment in other foreign countries has made the United States safer from terrorist attacks. WT11 I believe that the U.S. needs to increase military presence in foreign countries fight the war on terror more efficiently. WT9 I believe the loss of life experienced by the U.S. Armed Forces in pursuit of the War on Terror is sufficiently justified by the end goal. WT7 I believe the United States has the authority to act preemptively in other countries if the security of America is threatened. WT1 I believe the U.S. has the authority to employ whatever means necessary to extract information from those deemed enemy combatants. WT8 I believe the amount of money forecasted for spending in regards to the Iraq war is inconsequential in comparison to stabilizing the country under a democracy. WT3 I believe that the War on Terror requires more economic and resource allocation consideration. Psychology 436 .788 .740 .718 .657 .645 .563 .449 WT4 I believe the U.S. should focus more on domestic problems rather than foreign issues. R1 I attend my place of worship (church/synagogue/temple) and practice the beliefs of my religion on a regular basis. R5 I do not consider myself a religious person. R9 I feel that it is inconsiderate to share my religious beliefs with people who have not asked me. -.751 -.500 -.416 SPSS Lab 4 Psychology 436 WT6 I believe the costs and loss of resources in sustaining the War on Terror should be a primary concern for the U.S. lawmakers. S9 I am aware that smoking bothers some people R3 People with religious beliefs and practices different than mine are acceptable to me as long as they can live peacefully with others and obey the rules of society. 11.2 Items in red above should be deleted from all further analysis. Also, we will put Factor 5 items aside for further analysis. SPSS Lab 4 Psychology 436 Task 12 Reliability Analysis – Smoking Scale Comments Let’s compute reliability estimates on our four scales, using only the items retained after the factor analysis above. These must be run one at a time. Comments Below is an example of how to do this, only for the smoking scale. Repeat this with all four scales. 12.1 From the Analyze Menu, select Scale, then Reliability Analysis… 12.2 In the pop-up window, select S1, S2, S3, S4, S5, S7, S8, S10, S11. Do not choose S6, S9, then click the arrow to put these items into the Items window on the right. 12.3 Verify that Alpha appears in the Model window (it always will). 12.4 In the Scale Label field, write in the name of the scale as “Smoking”. 12.5 Click the “Statistics…” box and look at the pop-up window. 12.6 Select the statistics as indicated in the figure below and click Continue: SPSS Lab 4 Psychology 436 12.7 Click OK to run the analyses. 12.8 Repeat this process with the other three scales (again, using ONLY those items that had loadings > .4 in the above. SPSS Lab 4 Psychology 436 Task 13 Examine the Output 13.1 Take a look at the alpha level. It should look like the below: Reliability Statistics Cronbach's Alpha Cronbach's Alpha Based on Standardized Items .870 Comments 13.2 .869 N of Items 9 Looking good, smoking group! Remember, if deleting any item would improve the alpha level by .02 or more, then drop that item from the scale! SPSS Lab 4 Psychology 436 Task 14 Factor Analyze the Criterion Data (with Factor 5 Items) Objectives We want to see if we can make scale scores out of the criteria data. Comments Run a factor analysis on the criteria items (C1 to C12, plus Items R1, R5, and R9) 14.1 Repeat the steps from earlier on the criterion data. You may find different results, but here’s what I get from the initial output. 14.2 Note, I had to increase the number of iterations on the rotations button menu to 50 to get result. Scree Plot Eigenvalue 4 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Factor Number 14.3 Based on this output, I re-ran with four factors. Pattern Matrix(a) Factor 1 R1 I attend my place of worship (church/synagogue/temple) and practice the beliefs of my religion on a regular basis. .862 R5 I do not consider myself a religious person. .667 C2 I try to get others to convert to my religious faith whenever I can. -.609 2 3 4 SPSS Lab 4 Psychology 436 R9 I feel that it is inconsiderate to share my religious beliefs with people who have not asked me. .600 C1 I get stressed easily .690 C3 I am a goal oriented person .617 C4 I like to assess my achievements in order to know how I am succeeding .595 C6 I tend to vote for conservative political candidates. .632 C9 I have friends from different backgrounds. -.528 C12 I have, or plan on obtaining, an advanced degree (for example, Masters or Ph.D. degree) C11 I enjoy learning about exotic places. -.499 -.487 C10 The drug laws in this country should be relaxed. 14.4 C8 I am motivated in accomplishing my daily activities .573 C5 I am a very confident person .454 C7 I am proud to be an American. .411 The first three factors seem to make sense. The first I might term Religiosity. The second, I term “achievement orientation”, the third is “openness to experience”. The fourth doesn’t make much sense and should not be used as a factor. SPSS Lab 4 Psychology 436 Task 15 Recode Necessary Items from Criterion Scales Objectives You want all of the factor loadings in the criterion factors to be of the same sign. Thus, we need to reverses code R1, R5, R9 (we have already reverse R1, now we reverse it back along with R5 and R9 to make the scale interpretable as Religiosity), and C6. 15.1 Repeat the steps from Step 5 for Items C2 and C6 15.2 Save the Data file. SPSS Lab 4 Psychology 436 Task 16 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. 16.1 Under the Transform menu, choose Compute. 16.2 In the Target Variable box, type “Smoking”. 16.3 Under the Function Group choose Statistical. 16.4 Under Functions and Special Variables, choose Mean and click the up arrow to move it into the Numeric Expression box. 16.5 Highlight the first question mark in the Numeric Expression box. 16.6 Choose the first Smoking item and hit the right arrow to replace the question mark with the item. 16.7 Highlight the second question mark in the Numeric Expression box. 16.8 Choose the second Smoking item and hit the right arrow to replace the question mark. 16.9 Manually type a comma after this second item, then choose the next Smoking items I4 and move it to the Numeric Expression Box. REMEMBER TO ONLY USE THOSE ITEMS THAT WERE KEPT AFTER THE FACTOR AND RELIABILITY ANALYSES. 16.10 Click OK 16.11 Save your SPSS data file. 16.12 Repeat this process using the Organization Items, War on Terror Items, and Religious Tolerance Items. 16.13 Repeat this with the three criterions scales as well. 16.14 Save your data file! SPSS Lab 4 Psychology 436 Task 17 Compute Correlations among Variables Comments Let’s see how the variables relate to one another. 17.1 From the Analyze menu, select Correlate, then Bivariate. 17.2 Select the four scales developed, plus the three criterion scales, plus those criterion items that are not including in the criterion scales. 17.3 Click OK. 17.4 Does your scale correlate with those it is expected to? Does it not correlate with those it was not expected to correlate with? We will discuss further in class and be on the lookout for descriptions of what to include in your final project results soon!