

- #Normalize variable spss code how to
- #Normalize variable spss code code
- #Normalize variable spss code download
Here is a simplified example: value group centralizedvalue valuestandardizedbyspss mysteryfactor Obtaining the value of the standardized variables is easy, Our question is: HOW are the variables standarized? + coefficient_n * standardized_variable_n. This link: explains that discrimant scores produced by SPSS are a of the form coefficient_1*standardized_variable_1 +.
#Normalize variable spss code code
If 'yes' is coded 1 and 'no' is coded 2, you can use something likeĢ - Reverse code negatively coded variables so that, for all variables involved, higher scores (numbers) indicate higher depression.We are trying to reproduce the outcome of a discriminant analysis done in SPSS and run into a mystery.
#Normalize variable spss code how to
How to write a syntax that tells SPSS to sum up the yes answers (and not the no answers) to questions 7 to 12 and, in addition, the no answers (and not the yes answers) to questions 1 to 5. Now, to calculate the sum of those questions not only should you include responses 'Yes' (for the sake of an example, to questions 7 to 12) but also responses 'No' to certain items (let us say, questions 1 to 5). There, in this questionnaire, as you know, some questions load onto a certain scale, let us say depression. Simply, my question is related to the interpretation of mini-mult MMPI. I have got a question to ask and I hope that you will kindly guide me as to it. Like so, our last example shows a different route to flag fulltime working males and females using different criteria.Įxample 4 - Compute Variable Differently Based on Gender II You can get around this limitation by combining RECODE with DO IF, however. If(gender = 0 & whours >= 36) fulltime = 1. This is the reason whyīut you can use an IF condition involving multiple variables: Second, RECODE can only set values based on a single variable. You can't RECODE a function -mean, sum or whatever- into anything nor recode anything into a function. Is not possible -q1 is a variable, not a constant- but However, RECODE has more limitations too.įirst off, RECODE only replaces (ranges of) constants -such as 0, 99 or system missing values- by other constants. In many cases, RECODE is an easier alternative for IF. *IF: respondents meeting both conditions get result_2. *DO IF: respondents meeting both conditions get result_1.

The syntax below sketches this idea.ĭO IF - ELSE IF Versus Multiple IF Commands If you use multiple IF commands instead, the last condition met by each case takes effect. If cases meet more than 1 condition, the first condition prevails when using DO IF - ELSE IF.IF is a conditional COMPUTE command whereas DO IF can affect other transformations -such as RECODE or COUNT- as well.IF is a single line command while DO IF requires at least 3 lines: DO IF, some transformation(s) and END IF.The main differences between DO IF and IF are that Some SPSS users may be familiar with DO IF. The minimum for females working fulltime is 36. The maximum for females not working fulltime is below 36. This table -shown below- is a nice way to check the results. Our syntax ends with a MEANS table showing minima, maxima, means and standard deviations per gender per group. means whours by gender by fulltime /cells min max mean stddev. add value labels fulltime 0 'Not working fulltime' 1 'Working fulltime'. if(gender = 1 & whours >= 40) fulltime = 1. if(gender = 0 & whours >= 36) fulltime = 1. *Set fulltime to 1 if whours >= 36 for females or whours >= 40 for males. We then set it to one if the year -extracted from the date of birth- is in the RANGE 1980 through 1989. The syntax below first computes our flag variable -born80s- as a column of zeroes. Let's flag all respondents born during the 80’s. Example 1 - Flag Cases Based on Date Function
#Normalize variable spss code download
For getting the most out of this tutorial, we recommend you download the file and try the examples for yourself.
