Multiple regression analysis y=Bo B Bx+ Bx +.Bkk+u ◆5. dummy variables Economics 20- Prof anderson
Economics 20 - Prof. Anderson 1 Multiple Regression Analysis y = b0 + b1 x1 + b2 x2 + . . . bk xk + u 5. Dummy Variables
Dummy variables o a dummy variable is a variable that takes on the value 1 or o o Examples: male= 1 if are male, 0 otherwise), south(=l if in the south, 0 otherwise), etc o Dummy variables are also called binary variables for obvious reasons Economics 20- Prof anderson
Economics 20 - Prof. Anderson 2 Dummy Variables A dummy variable is a variable that takes on the value 1 or 0 Examples: male (= 1 if are male, 0 otherwise), south (= 1 if in the south, 0 otherwise), etc. Dummy variables are also called binary variables, for obvious reasons
A Dummy Independent variable e Consider a simple model with one continuous variable(x) and one dummy (d) ◆y=B+ad+B1x+ o This can be interpreted as an intercept shift o If d=0, then y=Bo+ Bx+u o If d=1, then y=(Bo+8)+Bx+u 2 The case of d=0 is the base group Economics 20- Prof anderson
Economics 20 - Prof. Anderson 3 A Dummy Independent Variable Consider a simple model with one continuous variable (x) and one dummy (d) y = b0 + d0d + b1 x + u This can be interpreted as an intercept shift If d = 0, then y = b0 + b1 x + u If d = 1, then y = (b0 + d0 ) + b1 x + u The case of d = 0 is the base group
Example of so>0 y=(B+)+B1 slope= B d=0 B y= Bo t Bix X Economics 20- Prof anderson 4
Economics 20 - Prof. Anderson 4 Example of d0 > 0 x y d0{ }b0 y = (b0 + d0 ) + b1 x y = b0 + b1 x slope = b1 d = 0 d = 1
Dummies for Multiple Categories o We can use dummy variables to control for something with multiple categories e Suppose everyone in your data is either a Hs dropout, Hs grad only, or college grad To compare hS and college grads to Hs dropouts, include 2 dummy variables o hsgrad=1 if HS grad only o otherwise. and colgrad- 1 if college grac d, O otherw Economics 20- Prof anderson 5
Economics 20 - Prof. Anderson 5 Dummies for Multiple Categories We can use dummy variables to control for something with multiple categories Suppose everyone in your data is either a HS dropout, HS grad only, or college grad To compare HS and college grads to HS dropouts, include 2 dummy variables hsgrad = 1 if HS grad only, 0 otherwise; and colgrad = 1 if college grad, 0 otherwise