options crt; ? ? Example of how to compute a Chow test for 2SLS estimation. ? TSP 4.2A (1990) ? Author: Clint Cummins ? smpl 1,100; trend t; low = t <= 50; high = 1-low; dot 1-6; random e.; le. = e.*low; he. = e.*high; enddot; xt = 1 + e1 + e2 + e3 + e4; x = xt + e5; lx = low*x; hx = high*x; y = 2*low + low*xt - high - high*xt + e6; ? ? z is full list of instruments, split between first 50 and ? last 50 observations. ? list z low high le1-le4 he1-he4 ; ? iv(inst=(c,e1-e4)) y c x; set wrongphi = @phi; ? wrong because instruments aren't split sample iv(inst=z) y c x; set rphi = @phi; ? phi for restricted model. iv(inst=z) y low high lx hx; set uphi = @phi; ? unconstrained phi. set ddf = @nob-4 ; set f = (rphi-uphi)/2/(@ssr/ddf); print rphi uphi wrongphi; cdf (f,df1=2,df2=ddf) f ; ? ? Now estimate using separate samples, low and high. ? select low; iv(inst=z) y c x; set uphi1 = @phi; select high; iv(inst=z) y c x; set uphi2 = @phi; set uphisum = uphi1+uphi2; print uphisum uphi; ? Should be the same. stop ; end ;