mean salary = when (has a degree)
For this model, the change in mean annual salary with a one year increase of experience depends on whether or not the employee has a college degree. Thus, the two variables years of experience and presence of a college degree interact. The interaction is displayed in Figure 4.
Figure 8. Categorical (interaction)
MULTI-CATEGORY VARIABLES
Suppose that there are more than two categories for the variables observed. For instance, assume you have a variable with three-categories. First instinct is to create one variable and code it with three values, zero, one and two for each of the three categories. However, this is inaccurate. If you were to attempt this, you would be imposing an arrangement on the groups that is not necessarily implied in the context of the problem. The correct approach is to define two dummy variables [2].
For example, assume that y is the once again the annual salary of an employee, = years of experience, and that the level of college degree is being considered. Then
Share with your friends: |