Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 7 – Binary or Zero/one or Dummy Variables.

Similar presentations


Presentation on theme: "Chapter 7 – Binary or Zero/one or Dummy Variables."— Presentation transcript:

1 Chapter 7 – Binary or Zero/one or Dummy Variables

2 Dummy Variables – Example

3 Example – WAGE1 Data Set

4

5

6 Graphical Interpretation of Sex Effect

7 Example – WAGE1 Data Set Interpretation of fitted model: wage = 0.623 - 2.27 female + 0.506 educ The wage differential between females and males of -2.27 dollars per hour is due to sex of the individual and, potentially, factors we have not controlled for.

8 Example – WAGE1 Data Set

9

10

11 wage = 7.10 - 2.51 female Estimated mean wage of males is $7.10 per hour Estimate mean wage of females is $7.10 – 2.51 = $4.59 per hour

12 Example – WAGE1 Data Set What is the effect (if any) on wage of a person’s marital status? (Did you check your regression assumptions?)

13 Example – WAGE1 Data Set Examine the effect on wage of a few of the other dummy variables in this data set.

14 Example – WAGE1 Data Set

15 lwage = 1.81 - 0.397 female Predictor Coef SE Coef T P Constant 1.81357 0.02981 60.83 0.000 Female -0.39722 0.04307 -9.22 0.000 About 40% decrease in hourly wage if individual is female!

16 Example – WAGE1 Data Set How do we handle multiple dummy variables at once? Consider the two variables married and female. We have four categories: single male, single female, married male, and married female.

17 Need to create three new dummy variables MarriedmaleMarriedfemaleSinglefemale Single Male000 Married Male100 Single Female001 Married Female010

18 We have four categories: single male, single female, married male, and married female. Need to create three new dummy variables In order to create the dummy variables marriedmale, marriedfemale, and singlefemale, use the calculator and a nested and statement within an if statement in Minitab.

19 We have four categories: single male, single female, married male, and married female. wage = 5.17 + 2.82 marriedmale - 0.602 marriedfemale - 0.556 singlefemale Predictor Coef SE Coef T P Constant 5.1680 0.3614 14.30 0.000 marriedmale 2.8150 0.4363 6.45 0.000 marriedfemale -0.6021 0.4645 -1.30 0.195 singlefemale -0.5564 0.4736 -1.18 0.241 S = 3.35181 R-Sq = 18.1% R-Sq(adj) = 17.6%

20 Did you check the assumptions of homoskedasticity and normality?

21 We have four categories: single male, single female, married male, and married female. lwage = 1.52 + 0.427 marriedmale - 0.0797 marriedfemale - 0.132 singlefemale Predictor Coef SE Coef T P Constant 1.52081 0.05099 29.83 0.000 marriedmale 0.42668 0.06155 6.93 0.000 marriedfemale -0.07974 0.06552 -1.22 0.224 singlefemale -0.13164 0.06680 -1.97 0.049 S = 0.472836 R-Sq = 21.3% R-Sq(adj) = 20.9%

22 Did you check the assumptions of homoskedasticity and normality?

23 lwage = 0.321 + 0.213 marriedmale - 0.198 marriedfemale - 0.110 singlefemale + 0.0789 educ + 0.0268 exper - 0.000535 expersq + 0.0291 tenure - 0.000533 tenursq Predictor Coef SE Coef T P Constant 0.3214 0.1000 3.21 0.001 marriedmale 0.21268 0.05536 3.84 0.000 marriedfemale -0.19827 0.05784 -3.43 0.001 singlefemale -0.11035 0.05574 1.98 0.048 educ 0.078910 0.006694 11.79 0.000 exper 0.026801 0.005243 5.11 0.000 expersq -0.0005352 0.0001104 -4.85 0.000 tenure 0.029088 0.006762 4.30 0.000 tenursq -0.0005331 0.0002312 -2.31 0.022 S = 0.393290 R-Sq = 46.1% R-Sq(adj) = 45.3%

24 Did you check the assumptions of homoskedasticity and normality?

25 Example – BEAUTY Data Set Do looks affect hourly wage? Variable: looks Has five levels: 1, 2, 3, 4, 5 Make dummy variables where: 1, 2 – below average 3 – average 4, 5 – above average

26 Example – BEAUTY Data Set Do looks affect hourly wage? Make dummy variables where: 1, 2 – below average 3 – average 4, 5 – above average You only need two dummy variables: belowaverage and aboveaverage

27 Example – BEAUTY Data Set Do looks affect hourly wage? Your conclusions? Did you check assumptions?

28 Example – BEAUTY Data Set Do looks affect hourly wage? Now, run a separate analysis for females and for males. Your conclusions? Did you check assumptions?

29 Dummy Variables and the Interaction Term Consider the Wage1 data set. Response: log(wage) Predictor variables: female, married, female*married, educ, exper, exper^2, tenure, and tenure^2. NOTE: need to run this model in general linear regression of Minitab

30 Dummy Variables and the Interaction Term Term Coef SE Coef T P Constant 0.321378 0.100009 3.2135 0.001 female -0.110350 0.055742 -1.9797 0.048 married 0.212676 0.055357 3.8419 0.000 female*married -0.300593 0.071767 -4.1885 0.000 educ 0.078910 0.006694 11.7873 0.000 exper 0.026801 0.005243 5.1118 0.000 expersq -0.000535 0.000110 -4.8471 0.000 tenure 0.029088 0.006762 4.3016 0.000 tenursq -0.000533 0.000231 -2.3056 0.022 Summary of Model R-Sq = 46.09% R-Sq(adj) = 45.25%

31 Dummy Variables and the Interaction Term lwage = 0.321378 - 0.11035 female + 0.212676 married + 0.0789103 educ + 0.0268006 exper - 0.000535245 expersq + 0.0290875 tenure - 0.000533142 tenursq - 0.300593 female*married Interpretation of dummy variables coefficients.

32 Example – Problem C7.2 Complete C7.2 (i), (iii), and (iv) in class


Download ppt "Chapter 7 – Binary or Zero/one or Dummy Variables."

Similar presentations


Ads by Google