Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Independent X – variables that take on only a limited number of values are termed categorical variables, dummy variables, or indicator variables. 

Similar presentations


Presentation on theme: " Independent X – variables that take on only a limited number of values are termed categorical variables, dummy variables, or indicator variables. "— Presentation transcript:

1

2  Independent X – variables that take on only a limited number of values are termed categorical variables, dummy variables, or indicator variables.  Common examples are: time periods in which there is a price surge or bubble; months of the year; days of the week; gender; educational level.

3 Executive Annual_Salary 0 $38,450 0 $50,912 0 $29,356 0 $27,750 1 $109,285 0 $48,442 0 $40,207 0 $42,331 1 $87,489 0 $26,118

4  Salary is the dependent variable that is to be estimated.  Executive is a categorical variable that has only two values: 0 – represents that the employee is not an executive; 1 – represents that the employee is an executive.  A linear regression model may be constructed: Salary = a + b * Executive

5 Regression Statistics Multiple R0.874 R Square0.764 Adjusted R Square0.760 Standard Error11850.63 Observations52 CoefficientsStandard Errort Stat Intercept37513.551828.5920.51 Executive53087.954169.8312.73 Salary = a + b * Executive Highly Significant Average Salary for non- Executive: $37,514 Average Salary for Executive: $90,601

6  The effect of a categorical variable is to add an additional constant amount to the y- intercept for the subset of points included in the category.  Graphically, it creates a separate regression line for each category. The slope of the line is constant but the y-intercepts vary.

7

8 Regression Statistics Multiple R0.177 R Square0.031 Adjusted R Square0.012 Standard Error24021.57 Observations52 CoefficientsStandard Errort Stat Intercept52126.004804.3110.85 Gender-8480.306667.32-1.27 Salary = a + b * Gender Not Significant Average Salary for 0-Gender: $52,126 Average Salary for 1-Gender: $43,646

9

10 Regression Statistics Multiple R0.650 R Square0.422 Adjusted R Square0.411 Standard Error18551.51 Observations52 CoefficientsStandard Errort Stat Intercept11656.276497.101.79 Education8448.011397.466.05 Salary = a + b * Education Significant Average Salary for 0 Education: $11,656 Additional Value per year: $8,448

11

12  The Education variable has multiple values: 0, 2, 4, 6, 8. This variable was used directly in the regression estimation. Although it appeared categorical, it was in fact used as a numerical variable.  Implicit in the use of any explanatory variable is that its effect is linearly increasing or decreasing. For the education variable, this would mean that the effect on Salary of having a two-year degree would be exactly ½ of the effect of having a four- year degree.  This linearity may be questionable.

13  Linearity would imply “incorrectly” that dropping out after three years of college, in salary terms, would result in a loss of “only” $8448, compared with finishing one’s Bachelor’s degree.  But, since degrees are really “0” and “1”, a better approach is to consider each level of degree as a separate categorical variable.

14  If the linearity of a limited value variable is questionable, then the variable may be better modeled by constructing a series of indicator or dummy variables that each represents exactly one value: Education0, Education2, Education4, Education6, Education8. In this way, the effect of each level can be considered independently.  This technique frequently occurs with time variables, i.e. months. One should not implictly assume that the monthly effect in December (12) is 12 times as large as the monthly effect in January (10.

15 R2Y-InterceptTstat YintSlopeTstat Slope Education014%5032915-33887-3 Education211%5001815-29833-2 Education40%4767510880 Education62%455621286431 Education827%4466415530144

16  The previous results illustrate some values, but also obscure other values.  The results show that having less than a Bachelor’s degree has a significant $30,000 effect on average salary at this company.  The lack of statistical significance for the Bachelor’s degree and Master’s degree variables obscures the fact that it is unreasonable to use these variables alone since it would conflate the salaries for Ph.D.’s with the salaries of those with no college, when it is clear that at this company the two groups do not earn anything near the same salary.

17 SUMMARY OUTPUT Regression Statistics Multiple R0.709 R Square0.503 Adjusted R Square0.461 Standard Error17748 Observations52 CoefficientsStandard Errort Stat Intercept16442.258874.131.85 Education23742.7512549.920.30 Education431321.119486.853.30 Education637762.7510147.963.72 Education881236.4213555.465.99


Download ppt " Independent X – variables that take on only a limited number of values are termed categorical variables, dummy variables, or indicator variables. "

Similar presentations


Ads by Google