![]() ![]() ![]() ![]() ![]() You can compute new variables based on highly complex equations, utilizing a wide variety of mathematical functions. In this example, however, we will simply compute a new variable that is the difference between the values of two existing variables. The data file demo.sav contains a variable for respondent's current age and a variable for number of years at current job. It does not, however, contain a variable for the respondent's age at the time he or she started that job. We can create a new variable that is the computed difference between current age and number of years at current job -- which should be the approximate age at which the respondent started that job.
Transform
Click OK to compute the new variable. The new variable is displayed in the Data Editor. Since the variable is added to the end of the file, it is displayed in the far right column in Data view and in the last row in Variable view. |
|
Computing New Variables |