Transform a bnary qualtatve varable (wth non-numercal values) to a dummy varable. For example, GENDER = f the observaton s male = f t s female (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty Note that ) the settng s arbtrary. owever, t should make the nterpretaton smple. ) In general, zero wll be gven to the reference case. In the example, female s treated as reference. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty
Example Expendture functon Male EXP = + β Female : β γ, β β INC + ε EXP = γ + γ INC + ε : β = γ, β = γ Do male and female share the same mean equaton? γ (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3 Integrate the expendture functons. Defne a dummy varable MALE= for male EXP = β MALE + γ ( MALE + β MALE INC + γ ( MALE ) INC + ε ) (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 4
Integrate the two data sets. EXP MALE -MALE MALE*INC (-MALE)*INC Male Male... Y EXP Female EXP INC Female.... INC (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 5 Run OLS on the ntegrated data Number of parameters (K) = 4 degrees of freedom = n M + n F - 4 where n M and n F are sample sze of the male and female samples, respectvely Do Generalzed F-test wth F cal ~ F(, n M + n F - 4) (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 6
RLS or Wald test s OK. Accept => male and female share the same ntercept and the same slope n the expendture functon Chow Test s equvalent to the two-run generalzed F-test (RLS) (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 7 Chow Test (cont d) F cal SSR ( SSRM + SSRF ) nm + n 4 SSR + SSR T F = M ~ F(, n M n 4) + F where SSR M and SSR F are the sum of squared resduals from the tow separate runs and SSR T s generated from OLS run on the stacked data set F (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 8
Stacked data set EXP INC Male Male. Y EXP Female EXP INC Female.. INC (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 9 Chow Test (cont d) Note that SSR M +SSR F s the same as SSR of the unrestrcted model and SSR T s the SSR of the restrcted model. It s referred to as Chow s Breakpont test n Evews. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty
Partal Chow Test Case the slopes are dentcal. Only the ntercept could be dfferent EXP F β γ β INC + ε = MALE + ( MALE ) + cal : β = γ : β γ M + n F ~ F(, n 3) (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty Partal Chow Test Case the ntercepts are dentcal. Only the slope could be dfferent EXP = β + βmale INC + γ ( MALE ) + ε : β = γ : β γ F ~ F(, n n 3) cal M + F (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty
Expendture also depends on Provnce they lve. Defne BKK= f the observaton s n Bangkok. Otherwse, BKK=. Unrestrcted Model EXP = αmalebkk + βmale ( BKK ) +γ ( ) BKK +δ( MALE )( BKK ) + α MALE INC+ γ ( MALE ) INC+ ε (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3 Assumpton The slope depends only on the gender not locaton but the ntercept could depend on both gender and provnce. Test f nether gender nor provnce has no effect on the expendture. : α = β = γ : α β γ = δ, α δ, α (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty = γ γ 4
Restrcted Model EXP = α + α INC + ε Do F-test usng F cal ~ F(4, n n 6) M + F (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 5 So far, the above settng of dummy varables s of swtchng type. A dummy varable s used to select the approprate parameter for each observaton. Another settng s ncremental type. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 6
Example Expendture Functon EXP =γ + δmale γ INC + δ MALE INC + ε + Note that γ,γ are the ntercept and slope for female δ s the ntercept devaton for male δ s the slope devaton for male (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 7 Examples Color: RED, BLUE, GREEN Day-of-Week: Mo,Tu,We,Th,Fr Queston Prce volatlty of a certan day depends on whether t s a week-begnnng day, a md-week day or a week-endng day. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 8
Defne STD = f the day s a week-startng day =, otherwse. MID= f t s a md-week day =, otherwse. END= f t s a week-endng day =, otherwse. Note that STD+MID+END= always and one of the dummes could be elmnated (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 9 Swtchng Settng VOL = β STD + β + γ MID + γ + END + δ STD MID VAL VAL δ END VAL + ε Note that β, γ, δ are the ntercepts for each day category β, γ /, δ are the slopes for each day category (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty
Incremental Settng VOL = β STD + β + γ + γ STD (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty VAL VAL δ END + δ END VAL + ε + Note that β +γ, γ, δ +γ are the ntercepts for each category β +γ, γ /, δ +γ are the slopes for each category Md-week s used as the reference To test that there s no dfference between categores (F-test or Ch-square test) Swtchng Settng : β = γ = δ, β Incremental Settng : β γ δ, β : β = δ = : β δ, β, β = γ = δ γ δ = δ = δ (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty
F cal ~ F(4, n n + n 6) STD + MID END where n = nstd+ nmid+ nend Chow Test for Swtchng Settng F cal = SSRT ( SSRSTD + SSRMID+ SSREND ) n 6 SSR + SSR + SSR 4 STD MID END where SSR STD, SSR MID and SSR END are SSR from separate runs and SSR T s SSR from the stacked data (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3 Condtonal mean of Y s a pecewse lnear functon of X Two knks take place at X=a and X=a E(Y x) a a (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty x 4
Swtchng Settng Defne D = f X<a =, otherwse. D = f a < X< a =, otherwse. D = f X> a =, otherwse. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 5 Swtchng Settng Y =β D + β X D + ( β + β a) D + β 3( X a) D + { β + β a+ β 3( a a)} D + β 4 ( X a ) D + ε β s the ntercept β,β 3,β 4 are the slope of each secton (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 6
Re-arrange Y =β( D + D + D ) 44 443 X ( X D + ad + ad +β ) 4444444 3 X +β3{( X a ) D + ( a a ) D} 44444444 3 + β 4 ( X a ) D + ε 443 X X 4 (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3 7 Incremental Settng Defne D = f X>a =, otherwse. D = f X> a =, otherwse. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 8
Incremental Settng (more smple) Y =β + β X +δ ( X a) D + ( X a) D δ + ε β s the ntercept β s the slope of the frst secton δ,δ are the ncremental of the slope (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 9 To test whether the functon s sngle pece (slope s constant for all X) Swtchng Settng Incremental Settng : β = β = β 3 : β β β 3 : δ = δ = : δ δ 4 4 (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3
Non-lnear Approxmaton to a Pecewse Lnear Model () In general, the locatons of knks (a,a ) are unknown. ow can we estmate them? Logstc Transformaton of dummy varables for Incremental Settng Approx. contnuous functon of X for D s + e M ( X a ) f M s a large postve value (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3 Non-lnear Approxmaton to a Pecewse Lnear Model () D.5 a x (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 3
Non-lnear Approxmaton to a Pecewse Lnear Model (3) Approx. non-lnear regresson Y X a = β + β X + δ + e X a δ +ε M ( X a ) + e M ( X a ) + Apply Non-lnear LS. Another approx. s a polynomal regresson. (c) Pongsa Pornchawseskul, Faculty of Economcs, Chulalongkorn Unversty 33