Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

SPSS COMPUTE IF argument1 AND argument2 AND argument3

Graduate student Howard Brandon came to me for help with his masters thesis. He wanted to dichotomize three continuous variables and then assign cases to groups (profiles) based on their scores on those dichotomized variables. I generally disapprove of dichotomizing continuous variables, but there was a good argument for doing so in this case. Here is the advice I gave him !irst find the median for each of the three continuous variables. "lic# $nalyze, %escriptive &tatistics, '(plore. &coot the three variables into the %ependent )ist bo( and then clic# *+. ,rite down the values of the medians. -ow to dichotomize the variables. !rom the data sheet, "lic# .ransform, /ecode, Into %ifferent 0ariables. &coot one of the continuous variables into the -umeric 0ariable Bo(. .ype the name of the new variable (the dichotomized variable) into the *utput 0ariable Bo(. "lic# *ld and -ew 0alues. &elect /ange )owest .hrough 11111 and type the value of the 2edian in the bo(. 'nter 3 in the new value bo( and clic# $dd. &elect /ange 11111 through highest and type the value of the 2edian 4 .555553 in the bo(. 'nter 6 in the new value bo( and clic# $dd.

"lic# "ontinue.

"opyright 6557, +arl ). ,uensch 8 $ll rights reserved.

"lic# "hange, *+. .he new dichotomous variable is created and can be viewed in the data sheet. I recommend dragging and dropping it right ne(t to the old variable so you can see that it wor#ed as intended. -ow imagine that Howard has created his three dichotomous variables and is ready to create the grouping variable (profile) based on scores on the three dichotomous variables. I shall illustrate using dichotomous variables gender, class, and verdict. If a case has a score of 3 on each of these three variables, it is to be placed into profile 3. !rom the data sheet, clic# .ransform, "ompute. In the .arget 0ariable bo( enter the name of the new variable. In the -umeric '(pression bo( enter 3. "lic# If. .ype in gender=1 and class=1 and verdict=1.

"lic# "ontinue.

"lic# *+. .he new variable, profile, is created, and all those cases with value 3 on each of the three defining variables will have value 3 for profile. -ow select those cases that will have value 6 for profile. !or my e(ample, these are cases where gender 9 3, class 9 3, and verdict 9 6.

"lic# *# and continue on until the profile variable is fully defined.


"opyright 6557, +arl ). ,uensch 8 $ll rights reserved.

You might also like