********************************************************************* * Replication file for nonjointness tests reported in Table 2 of * "Nonjointness and Scope Economies in the Multiproduct Symmetric * Generalized McFadden Cost Function," by K.G. Stewart (2009) Journal * of Productivity Analysis 32(3), 161-171. * * Estimation of two-output MSGM factor demand system for baseball * player characteristics: * - the model F0, without concavity imposed. * (The model F0 is the same as the model M0 of the paper "Are * Sports Teams Multiproduct Firms?") * - the normalization N2 of F0, and its associated special cases, * models F3 and F4. * * Here we test restrictions associated with nonjointness: * (a) nonjointness (conditional on the maintained hypothesis of * similar sectoral technologies): model F3 * (b) CRS and nonjointness (conditional on the maintained hypothesis * of similar sectoral technologies) and the separability that is * implied: model F4 * ******************************************************************** * Sample consists of 26 teams x 6 seasons (1986-91) SAMPLE 1 156; * Read in team characteristics; documented in Team.doc read(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(HedPrice1.dat) p1 p2 p3 p4 nobs * define team outputs * This scaling of road attendance yields fastest convergence GENR Y1=WINS GENR Y2=ROADatt/10000000 * 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 SAMPLE 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 SAMPLE 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 SAMPLE 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 SAMPLE 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 SAMPLE 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 SAMPLE 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=q1*p1+q2*p2+q3*p3+q4*p4 genr s1=q1*p1/cost genr s2=q2*p2/cost genr s3=q3*p3/cost genr s4=q4*p4/cost * compute mean hedonic cost shares reported in 1st column of Table 6 stat s1 s2 s3 s4 * Obtain mean factor inputs: * qm1=135.73077 * qm2=5.35117 * qm3=17.92278 * qm4=2.61538 stat q1 / mean=qm1 stat q2 / mean=qm2 stat q3 / mean=qm3 stat q4 / mean=qm4 GENR DENOM=qm1*p1+qm2*p2+qm3*p3+qm4*p4 gen1 theta1=qm1/2 gen1 theta2=qm2/2 gen1 theta3=qm3/2 gen1 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 Pd11=Pd11-Pd14-(Pd41-Pd44) GENR Pd12=Pd12-Pd14-(Pd42-Pd44) GENR Pd13=Pd13-Pd14-(Pd43-Pd44) GENR Pd21=Pd21-Pd24-(Pd41-Pd44) GENR Pd22=Pd22-Pd24-(Pd42-Pd44) GENR Pd23=Pd23-Pd24-(Pd43-Pd44) GENR Pd31=Pd31-Pd34-(Pd41-Pd44) GENR Pd32=Pd32-Pd34-(Pd42-Pd44) GENR Pd33=Pd33-Pd34-(Pd43-Pd44) GENR Pd12=2*Pd12 GENR Pd13=2*Pd13 GENR Pd23=2*Pd23 GENR Pd1=Pd1-Pd4 GENR Pd2=Pd2-Pd4 GENR Pd3=Pd3-Pd4 * Obtain parallel scalar means used in elasticities stat p1 / mean=m1 stat p2 / mean=m2 stat p3 / mean=m3 stat p4 / mean=m4 GEN1 mDENOM=qm1*m1+qm2*m2+qm3*m3+qm4*m4 GEN1 mdenom2=mdenom*mdenom GEN1 md1=m1/mDENOM GEN1 md2=m2/mDENOM GEN1 md3=m3/mDENOM GEN1 md4=m4/mDENOM GEN1 md11=md1*md1 GEN1 md12=md1*md2 GEN1 md13=md1*md3 GEN1 md14=md1*md4 GEN1 md21=md2*md1 GEN1 md22=md2*md2 GEN1 md23=md2*md3 GEN1 md24=md2*md4 GEN1 md31=md3*md1 GEN1 md32=md3*md2 GEN1 md33=md3*md3 GEN1 md34=md3*md4 GEN1 md41=md4*md1 GEN1 md42=md4*md2 GEN1 md43=md4*md3 GEN1 md44=md4*md4 GEN1 md11=md11-md14-(md41-md44) GEN1 md12=md12-md14-(md42-md44) GEN1 md13=md13-md14-(md43-md44) GEN1 md21=md21-md24-(md41-md44) GEN1 md22=md22-md24-(md42-md44) GEN1 md23=md23-md24-(md43-md44) GEN1 md31=md31-md34-(md41-md44) GEN1 md32=md32-md34-(md42-md44) GEN1 md33=md33-md34-(md43-md44) GEN1 md12=2*md12 GEN1 md13=2*md13 GEN1 md23=2*md23 gen1 md1=md1-md4 gen1 md2=md2-md4 gen1 md3=md3-md4 stat y1 / mean=ym1 stat y2 / mean=ym2 ** INITIAL PARAMETERIZATION ** * Benchmark parameterization of the MSGM system F0 * under normalization N1: 41 parameters * Shazam requires that the theta's (/2) appear numerically * Multiplicative factor 2 is included in parameter D1 nl 4 / ncoef=41 iter=999 Eq q1=(S11*Pd1+S12*Pd2+S13*Pd3 & -67.8654*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d11*dum1+d12*dum2+d13*dum3+d14*dum4+d15*dum5 & +B11*(Y1+BETA*Y2)+B1+LAMBDA1*(Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q2=(S12*Pd1+S22*Pd2+S23*Pd3 & -2.67558*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d21*dum1+d22*dum2+d23*dum3+d24*dum4+d25*dum5 & +B22*(Y1+BETA*Y2)+B2+LAMBDA2*(Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q3=(S13*Pd1+S23*Pd2+S33*Pd3 & -8.96111*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d31*dum1+d32*dum2+d33*dum3+d34*dum4+d35*dum5 & +B33*(Y1+BETA*Y2)+B3+LAMBDA3*(Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q4=-((S11+S12+S13)*Pd1+(S12+S22+S23)*Pd2+(S13+S23+S33)*Pd3 & +1.30769*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d41*dum1+d42*dum2+d43*dum3+d44*dum4+d45*dum5 & +B44*(Y1+BETA*Y2)+B4+LAMBDA4*(Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) end * obtain p-value for nonjointness restriction test d1 * Alternative normalisation N2 of the above model F0, * suited to testing CRS: set lambda4=1 nl 4 / ncoef=41 iter=999 Eq q1=(S11*Pd1+S12*Pd2+S13*Pd3 & -67.8654*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d11*dum1+d12*dum2+d13*dum3+d14*dum4+d15*dum5 & +B11*(Y1+BETA*Y2)+B1+LAMBDA1*(d0*Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q2=(S12*Pd1+S22*Pd2+S23*Pd3 & -2.67558*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d21*dum1+d22*dum2+d23*dum3+d24*dum4+d25*dum5 & +B22*(Y1+BETA*Y2)+B2+LAMBDA2*(d0*Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q3=(S13*Pd1+S23*Pd2+S33*Pd3 & -8.96111*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d31*dum1+d32*dum2+d33*dum3+d34*dum4+d35*dum5 & +B33*(Y1+BETA*Y2)+B3+LAMBDA3*(d0*Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) Eq q4=-((S11+S12+S13)*Pd1+(S12+S22+S23)*Pd2+(S13+S23+S33)*Pd3 & +1.30769*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d41*dum1+d42*dum2+d43*dum3+d44*dum4+d45*dum5 & +B44*(Y1+BETA*Y2)+B4+(d0*Y1*Y1+D1*Y1*Y2+D2*Y2*Y2) end * obtain p-value for nonjointness restriction test d1 * test CRS test test d0 test d1 test d2 test b1 test b2 test b3 test b4 end gen1 LLF0=$LLF * Restrict model to satisfy nonjointness (Should yield same * loglikelihood value as nonjointness-constrained N1 * parameterization. nl 4 / ncoef=40 iter=999 Eq q1=(S11*Pd1+S12*Pd2+S13*Pd3 & -67.8654*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d11*dum1+d12*dum2+d13*dum3+d14*dum4+d15*dum5 & +B11*(Y1+BETA*Y2)+B1+LAMBDA1*(d0*Y1*Y1+D2*Y2*Y2) Eq q2=(S12*Pd1+S22*Pd2+S23*Pd3 & -2.67558*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d21*dum1+d22*dum2+d23*dum3+d24*dum4+d25*dum5 & +B22*(Y1+BETA*Y2)+B2+LAMBDA2*(d0*Y1*Y1+D2*Y2*Y2) Eq q3=(S13*Pd1+S23*Pd2+S33*Pd3 & -8.96111*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d31*dum1+d32*dum2+d33*dum3+d34*dum4+d35*dum5 & +B33*(Y1+BETA*Y2)+B3+LAMBDA3*(d0*Y1*Y1+D2*Y2*Y2) Eq q4=-((S11+S12+S13)*Pd1+(S12+S22+S23)*Pd2+(S13+S23+S33)*Pd3 & +1.30769*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d41*dum1+d42*dum2+d43*dum3+d44*dum4+d45*dum5 & +B44*(Y1+BETA*Y2)+B4+(d0*Y1*Y1+D2*Y2*Y2) end * test CRS test test d0 test d2 test b1 test b2 test b3 test b4 end * LR test of nonjointness gen1 LLF3=$LLF gen1 LR03=2*(LLF0-LLF3) distrib LR03 / type=chi df=1 * Restrict model to satisfy CRS, separability, and nonjointness. nl 4 / ncoef=31 iter=999 Eq q1=(S11*Pd1+S12*Pd2+S13*Pd3 & -67.8654*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d11*dum1+d12*dum2+d13*dum3+d14*dum4+d15*dum5 & +B11*(Y1+BETA*Y2) Eq q2=(S12*Pd1+S22*Pd2+S23*Pd3 & -2.67558*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d21*dum1+d22*dum2+d23*dum3+d24*dum4+d25*dum5 & +B22*(Y1+BETA*Y2) Eq q3=(S13*Pd1+S23*Pd2+S33*Pd3 & -8.96111*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d31*dum1+d32*dum2+d33*dum3+d34*dum4+d35*dum5 & +B33*(Y1+BETA*Y2) Eq q4=-((S11+S12+S13)*Pd1+(S12+S22+S23)*Pd2+(S13+S23+S33)*Pd3 & +1.30769*(S11*Pd11+S12*Pd12+S13*Pd13 & +S22*Pd22+S23*Pd23 & +S33*Pd33))*(Y1+BETA*Y2) & +d41*dum1+d42*dum2+d43*dum3+d44*dum4+d45*dum5 & +B44*(Y1+BETA*Y2) end gen1 LLF4=$LLF * LR test of F4 relative to F3 gen1 LR34=2*(LLF3-LLF4) distrib LR34 / type=chi df=6 * LR test of F4 relative to F0 gen1 LR04=2*(LLF0-LLF4) distrib LR04 / type=chi df=7 stop