Model Fitting: Linear Regression |
The salary variable ranges from 67.5 to 2460 (measured in thousands of dollars). Since the variation of salaries is much greater for the higher salaries, it is appropriate to apply a logarithmic transformation to the salaries before fitting the model. You can use the Variable Transformation Wizard to transform the salary variable, as described in Chapter 32, "Variable Transformations."
Select Analysis Variable Transformation from the main menu. |
The Variable Transformation Wizard in Figure 21.1 appears.
Select the log10(Y+a) transformation from the Transformations list. |
Figure 21.1: Selecting a Log10 Transformation
Click Next. |
The wizard displays the page shown in Figure 21.2.
Figure 21.2: Selecting a Variable and Parameters
Scroll to the end of the variable list. Select the salary variable, and click Set Y. |
The parameter is an offset that is useful if your variable contains nonpositive values. For these data, you can accept the default value of .
Click Finish. |
Because there are missing values for the salary variable, a warning message appears (Figure 21.3) informing you that the transformed values for these observations are set to missing values.
Figure 21.3: A Warning Message
Click OK to dismiss the warning message. |
SAS/IML Studio adds the new variable, Log10_salary, as the last variable in the data set.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.