NAME SGMhausman1 'Hausman Tests: Model M1'; ?******************************************************************** ? Replication file 1a/11 for "Are Sports Teams Multiproduct Firms?" ? by K.G. Stewart and J.C.H. Jones (2010) Empirical Economics 39(2), ? 487-514. ? Model M1: output=y1 (wins) ? February 2009 ? Estimation of single-output SGM factor demand systems for baseball ? player characteristics, the models M1, M2, M3, ? without concavity imposed. ? This printout yields the Hausman tests reported in Table 1 of the ? paper. The tests are implemented in TSP because generalized inverse ? is needed for the vector-of-contrasts form of the test. ? Instrumental variables are those of the Hausman tests in REStat ? paper. ? The 3 replication files denoted 1/11 are identical except for ? the selected output (y1,y2,y3) and associated F test for weak ? instruments (see final lines of file). ?******************************************************************** SMPL 1 156; ? Sample consists of 26 teams x 6 seasons (1986-91) ? Read in team characteristics; documented in Team.doc read(file='Team.dat') season team league attend attlag ticprice pmarkup gameswon gameslst wins salaries nplayers strkouts walks slugavg nhitters npitchrs experhit experpit nstars roadatt aleast alcentrl alwest nleast nlcentrl nlwest; ? Delete variables not used in this analysis delete season team league attlag ticprice pmarkup gameswon gameslst salaries nplayers; ? read in hedonic prices read(file='HedPrice1.dat') p1 p2 p3 p4 nobs; ? read in city characteristics to be used as instruments; ? documented in City.doc read(file='City.dat') season team pop income white black hispanic landarea hincome nprfsprt; ? define team outputs GENR Y1=WINS; GENR Y2=roadatt/100000000; GENR Y3=attend/1000000; ? set output for this run genr y=y1; ? conference dummies genr dum1=aleast; genr dum2=alcentrl; genr dum3=alwest; genr dum4=nleast; genr dum5=nlcentrl; ? define team factor inputs: experience, hitting, pitching, stars GENR q1=experhit+experpit; GENR q2=nhitters*slugavg; GENR q3=npitchrs*strkouts/walks; GENR q4=nstars; ? DEFLATE HEDONIC PRICES TO 1991 DOLLARS SMPL 1 26; GENR p1=p1*135.0/109.6; GENR p2=p2*135.0/109.6; GENR p3=p3*135.0/109.6; GENR p4=p4*135.0/109.6; SMPL 27 52; GENR p1=p1*135.0/113.6; GENR p2=p2*135.0/113.6; GENR p3=p3*135.0/113.6; GENR p4=p4*135.0/113.6; SMPL 53 78; GENR p1=p1*135.0/118.3; GENR p2=p2*135.0/118.3; GENR p3=p3*135.0/118.3; GENR p4=p4*135.0/118.3; SMPL 79 104; GENR p1=p1*135.0/124.0; GENR p2=p2*135.0/124.0; GENR p3=p3*135.0/124.0; GENR p4=p4*135.0/124.0; SMPL 105 130; GENR p1=p1*135.0/130.7; GENR p2=p2*135.0/130.7; GENR p3=p3*135.0/130.7; GENR p4=p4*135.0/130.7; SMPL 1 156; ? Generate cost identity and cost shares ? (This synthetic (hedonic) cost series is used ? only for descriptive purposes in calculating the implied cost ? shares, not in estimation of cost function parameters. ? It can be compared with fitted ? cost series predicted by estimated model.) GENR COST=p1*q1+p2*q2+p3*q3+p4*q4; GENR S1=p1*q1/COST; GENR S2=p2*q2/COST; GENR S3=p3*q3/COST; GENR S4=p4*q4/COST; ? define instruments for use in Hausman tests genr I1=log(pop/1000000); genr I2=log(income/10000); genr I3=black; genr I4=hispanic; genr I5=log(landarea); genr I6=log(hincome/10000); genr I7=log(nprfsprt); ? set thetas to mean levels of factor inputs MSD Q1; SET qm1=@MEAN; ? qm1=135.73077 MSD Q2; SET qm2=@MEAN; ? qm2=5.35117 MSD Q3; SET qm3=@MEAN; ? qm3=17.92278 MSD Q4; SET qm4=@MEAN; ? qm4=2.61538 GENR DENOM=qm1*p1+qm2*p2+qm3*p3+qm4*p4; SET THETA1=qm1/2; SET THETA2=qm2/2; SET THETA3=qm3/2; SET THETA4=qm4/2; ? generate price constructs used in estimation GENR Pd1=p1/DENOM; GENR Pd2=p2/DENOM; GENR Pd3=p3/DENOM; GENR Pd4=p4/DENOM; GENR Pd11=pd1*pd1; GENR Pd12=pd1*pd2; GENR Pd13=pd1*pd3; GENR Pd14=pd1*pd4; GENR Pd21=pd2*pd1; GENR Pd22=pd2*pd2; GENR Pd23=pd2*pd3; GENR Pd24=pd2*pd4; GENR Pd31=pd3*pd1; GENR Pd32=pd3*pd2; GENR Pd33=pd3*pd3; GENR Pd34=pd3*pd4; GENR Pd41=pd4*pd1; GENR Pd42=pd4*pd2; GENR Pd43=pd4*pd3; GENR Pd44=pd4*pd4; GENR P11=Pd11-Pd14-(Pd41-Pd44); GENR P12=Pd12-Pd14-(Pd42-Pd44); GENR P13=Pd13-Pd14-(Pd43-Pd44); GENR P21=Pd21-Pd24-(Pd41-Pd44); GENR P22=Pd22-Pd24-(Pd42-Pd44); GENR P23=Pd23-Pd24-(Pd43-Pd44); GENR P31=Pd31-Pd34-(Pd41-Pd44); GENR P32=Pd32-Pd34-(Pd42-Pd44); GENR P33=Pd33-Pd34-(Pd43-Pd44); GENR P12=2*P12; GENR P13=2*P13; GENR P23=2*P23; GENR Pd1=Pd1-Pd4; GENR Pd2=Pd2-Pd4; GENR Pd3=Pd3-Pd4; PARAM S11 S12 S13 B11 B1 LAMBDA1 d11 d12 d13 d14 d15; PARAM S22 S23 B22 B2 LAMBDA2 d21 d22 d23 d24 d25; PARAM S33 B33 B3 LAMBDA3 d31 d32 d33 d34 d35; PARAM B44 B4 LAMBDA4 d41 d42 d43 d44 d45; ? Specify the SGM system: 38 parameters FRML E1 Q1=(S11*Pd1+S12*Pd2+S13*Pd3 -THETA1*(S11*P11+S12*P12+S13*P13 +S22*P22+S23*P23 +S33*P33))*y +d11*dum1+d12*dum2+d13*dum3+d14*dum4+d15*dum5 +B11*Y+B1+LAMBDA1*Y*Y; FRML E2 Q2=(S12*Pd1+S22*Pd2+S23*Pd3 -THETA2*(S11*P11+S12*P12+S13*P13 +S22*P22+S23*P23 +S33*P33))*y +d21*dum1+d22*dum2+d23*dum3+d24*dum4+d25*dum5 +B22*Y+B2+LAMBDA2*Y*Y; FRML E3 Q3=(S13*Pd1+S23*Pd2+S33*Pd3 -THETA3*(S11*P11+S12*P12+S13*P13 +S22*P22+S23*P23 +S33*P33))*y +d31*dum1+d32*dum2+d33*dum3+d34*dum4+d35*dum5 +B33*Y+B3+LAMBDA3*Y*Y; FRML E4 Q4=-((S11+S12+S13)*Pd1+(S12+S22+S23)*Pd2+(S13+S23+S33)*Pd3 +THETA4*(S11*P11+S12*P12+S13*P13 +S22*P22+S23*P23 +S33*P33))*y +d41*dum1+d42*dum2+d43*dum3+d44*dum4+d45*dum5 +B44*Y+B4+LAMBDA4*Y*Y; ? Iterative Zellner estimation yields efficient estimators ? under the assumptions of the SUR model LSQ(MAXIT=200,TOL=0.0001) E1 E2 E3 E4; copy @coef beff; copy @vcov veff; ? 3SLS yields consistent estimators in the presence of endogeneity ? Treat price constructs as exogenous, along with IV set ? in order to test for possible endogeneity in output y LSQ(MAXIT=100,tol=0.00001,maxitw=100, INST=(c,Pd1,Pd2,Pd3,P11,P12,P13,P22,P23,P33,dum1,dum2,dum3,dum4,dum5, I1,I3)) E1 E2 E3 E4; ? Hausman test as per p. 117 of TSP User's Manual mat dvar=@vcov-veff; mat htest1=(@coef-beff)'dvar"(@coef-beff); cdf(chisq,df=38) htest1; ? assumes full rank mat k=rank(dvar); mat htest2=(@coef-beff)'yinv(dvar)*(@coef-beff); cdf(chisq,df=k) htest2; ? checks actual rank ? Are the instruments used in the Hausman test any good? ? Test for weak instruments: F stat on instruments in 1st stage ? of 2SLS should exceed 10. ? For output=y1 (wins) best IV set is: I1 I3 olsq y c p1 p2 p3 p4 dum1 dum2 dum3 dum4 dum5 I1 I3; frml r1 I1; frml r2 I2; frml r3 I3; frml r4 I4; frml r5 I5; frml r6 I6; frml r7 I7; analyz r1 r3; olsq y c Pd1 Pd2 Pd3 P11 P12 P13 P22 P23 P33 dum1 dum2 dum3 dum4 dum5 I1 I3; analyz r1 r3; end;