SPSS Basics – or how to turn item-level variables into composite variables (e.g., turning 10 items designed to measure extraversion into an extraversion scale) We need to create composite variables that include our individual variables to create scales. Before we do this part, we need to recode any reverse-scored items to make sure that all items in the composite variables are coded in the same direction. Next, we need to compute the new, composite variables. Finally, it is good to compute the mean and standard deviation for newly-created composite variables. Syntax files, recoding variables, compute statements, out files, and the computation of variables in SPSS. A. Recoding Variables When we have multiple items in a psychological measure, several items are often worded in the opposite direction. To take this fact into account when we score our variables, we need to “recode” such items to make them in line with the other items. The best way to do this recoding is to use a SYNTAX (.sps) file. To reproduce this file in SPSS, click on File, then New, then Syntax. A blank page will appear. Type in the commands from the attached example. In a syntax file, you use an asterisk (*) to indicate a comment to yourself (not something read by the computer). Save this file when you are done typing the recode statements. To recode variables, simply highlight the commands you want to execute – then go to the “run” command and click “selection.” B. Computing new variables After you have recoded all reverse-scored items, you need to compute the composite variables. Create a new syntax file OR add to your existing syntax file. See attached example that works for this data set. Note how the syntax for creating these compute statements works. After you type all these commands in (it will be good for you), run the compute statements. After you have done this part, notice that you now have newlycreated variables in your data file. These variables are your composite variables. C. Output files. To get a sense of completing one simple SPSS command that produces an outfile, choose any of the composite variables you created. When in the Data file, click “analyze,” then “descriptive statistics,” then “Descriptives.” Now choose the variable you want to examine. The Descriptives command will give you the mean, standard deviation, N, and range of the variable of interest. After you choose your variable, either hit “paste” (not OK). After you hit “paste,” this command will go into an existing syntax file (at the bottom). You can then run the command from this syntax file by highlighting it and clicking “run” then “selection.” ________________________________________________________ * Recoding items for an example data set – based on a mood scale administered in a prior study * recoding the reverse-scored items from the first personality scale, the second personality scale, * and the mood scales for all three phases RECODE s_bf1 s_a5 s_a6 s_a7 s_a8 s_a11 s_a16 s_a17 mood_a1 mood_a7 mood_a12 mood_a17 mood_a21 mood_a24 mood_b1 mood_b7 mood_b12 mood_b17 mood_b21 mood_b24 mood_c1 mood_c7 mood_c12 mood_c17 mood_c21 mood_c24 (1=5) (2=4) (3=3) (4=2) (5=1). EXECUTE . * recoding the reverse-scored items from the Self-monitoring scale RECODE s_sm1 s_sm2 s_sm3 s_sm7 s_sm9 s_sm11 s_sm13 s_sm15 s_sm16 s_sm18 (1=5) (2=4) (3=3) (4=2) (5=1). EXECUTE . * recoding the one reverse-scored item from the sociosexuality scale RECODE socio7 (1=9) (2=8) (3=7) (4=6) (5=5) (6=4) (7=3) (8=2) (9=1). EXECUTE . * recoding the one reverse-scored item from the relationship satisfaction scale RECODE s_d9 (1=5) (2=4) (3=3) (4=2) (5=1). EXECUTE . ________________________________________________________ Compute statements for jealousy data ______________________________________________________ * Computing variables for the jealousy data. * Computing composite variables for Mood Scales (higher scores mean more psychological discomfort) * Computing moodtot1 Compute moodtot1 = sum(mood_a1, mood_a2, mood_a3, mood_a4, mood_a5, mood_a6, mood_a7, mood_a8, mood_a9, mood_a10, mood_a11, mood_a12, mood_a13, mood_a14, mood_a15, mood_a16, mood_a17, mood_a18, mood_a19, mood_a20, mood_a21, mood_a22, mood_a23, mood_a24) . Execute. * Computing moodtot2 Compute moodtot2 = sum(mood_b1, mood_b2, mood_b3, mood_b4, mood_b5, mood_b6, mood_b7, mood_b8, mood_b9, mood_b10, mood_b11, mood_b12, mood_b13, mood_b14, mood_b15, mood_b16, mood_b17, mood_b18, mood_b19, mood_b20, mood_b21, mood_b22, mood_b23, mood_b24) . Execute. * Computing moodtot3 Compute moodtot3 = sum(mood_c1, mood_c2, mood_c3, mood_c4, mood_c5, mood_c6, mood_c7, mood_c8, mood_c9, mood_c10, mood_c11, mood_c12, mood_c13, mood_c14, mood_c15, mood_c16, mood_c17, mood_c18, mood_c19, mood_c20, mood_c21, mood_c22, mood_c23, mood_c24) . Execute. * Computing composite variables for the five subscales of Personality scale 1 * 1. computing openness Compute s_o = sum(s_bf3, s_bf8, s_bf13, s_bf18, s_bf23, s_bf28, s_bf33). Execute. * 2. computing conscientiousness Compute s_c = sum(s_bf5, s_bf10, s_bf15, s_bf20, s_bf25, s_bf30, s_bf35). Execute. * 3. computing extraversion Compute s_e = sum(s_bf2, s_bf7, s_bf12, s_bf17, s_bf22, s_bf27, s_bf32). Execute. * 4. computing agreeableness Compute s_a = sum(s_bf4, s_bf9, s_bf14, s_bf19, s_bf24, s_bf29, s_bf34). Execute. * 5. computing neuroticism Compute s_n = sum(s_bf1, s_bf6, s_bf11, s_bf16, s_bf21, s_bf26, s_bf31). Execute. * Computing composite variables for Personality Scale 2 *** Computing attachment variables * 1. computing dependency Compute s_de = sum(s_a2, s_a3, s_a5, s_a13, s_a16, s_a17). Execute. * 2. computing anxiety Compute s_an = sum(s_a1, s_a4, s_a9, s_a11, s_a14, s_a15). Execute. * 3. computing closeness Compute s_cl = sum(s_a6, s_a7, s_a8, s_a10, s_a12, s_a18). Execute. * Computing self-monitoring composite score (higher scores mean one is more likely to pay attention to how he or she * presents him or herself in social situations) Compute sm = sum(s_sm1, s_sm2, s_sm3, s_sm4, s_sm5, s_sm6, s_sm7, s_sm8, s_sm9, s_sm10, s_sm11, s_sm12, s_sm13, s_sm14, s_sm15, s_sm16, s_sm17, s_sm18). Execute. * Computing SOCIOSEXUALITY composite score (higher scores mean more promiscuity) Compute sociosex = sum((5*socio1), socio2, (5*socio3), (4*socio4), (2*(socio5+socio6+socio7))). Execute. * COMPUTING MULTIDIMENSIONAL JEALOUSY composite SUBSCALES: * this variable represents the tendency to have jealous thoughts Compute jeal_cog = sum(mdj1, mdj2, mdj3, mdj4, mdj5, mdj6, mdj7). Execute. * this variable represents the tendency to have jealous emotions Compute jeal_emt = sum(mdj8, mdj9, mdj10, mdj11, mdj12, mdj13, mdj14, mdj15). Execute. * this variable represents the tendency to demonstrate jealous behaviors Compute jeal_beh = sum(mdj16, mdj17, mdj18, mdj19, mdj20, mdj21, mdj22, mdj23). Execute. * Computing relationship satisfaction composite score * higher scores mean happier in the relationship. Compute rel_sat = sum(s_d7, s_d8, s_d9). Execute.