options crt; ? 9e9 ? ? coded for TSP 4.4 or higher (uses DOT(CHAR=), LIST(PREFIX=) ) ? by Clint Cummins rev. 11/21/1998 in klem; freq a; smpl 47,71; ? Translog variables tc = 0; dot k l e m; v. = p.*q.; tc = tc + v.; enddot; lc = log(tc); ly = log(qy); trend t 0; dot(char=%) k l e m; s. = v./tc; l. = log(p.); l.m = log(p./pm); dot k l e m; param g..; enddot; param alpha.; param g.t; enddot; param la0 alphay gyy alphat gtt; title 'Translog Cost function with factor shares (a)'; ? disembodied technical change ? CRTS ? symmetry ? linear homogeneity in prices frml cf lc = la0 + alphak*lk + alphal*ll + alphae*le + (1-alphak-alphal-alphae)*lm + gkk*lk*lk + gkl*lk*ll + gke*lk*le + -(gkk+gkl+gke)*lk*lm + gkl*ll*lk + gll*ll*ll + gle*ll*le + -(gkl+gll+gle)*ll*lm + gke*le*lk + gle*le*ll + gee*le*le + -(gke+gle+gee)*le*lm + -(gkk+gkl+gke)*lm*lk + -(gkl+gll+gle)*lm*ll + -(gke+gle+gee)*lm*le + (gkk+gll+gee+2*(gkl+gke+gle))*lm*lm + ly + alphat*t + gtt*t*t + gkt*lk*t + glt*ll*t + get*le*t + -(gkt+glt+get)*lm*t ; frml eqk sk = alphak + gkk*lkm + gkl*llm + gke*lem + gkt*t; frml eql sl = alphal + gkl*lkm + gll*llm + gle*lem + glt*t; frml eqe se = alphae + gke*lkm + gle*llm + gee*lem + get*t; lsq cf eqk eql eqe; ? (a) ? Save the original estimates of the t coefficients, since they will ? be overwritten during testing, and they will be needed for part (c). list bts alphat gtt gkt glt get; length bts nbts; mmake btsave bts; title 'test for Hicks-neutral technical change (b)'; title 'Wald test (b.1)'; dot bts; frml r. .; enddot; list(prefix=r) rbts bts; analyz rbts; title 'LR test (b.2)'; ? For LR test, estimate restricted model, with the bts coefficients ? held fixed at zero. copy @logl llu; mat btzero = btsave*0; unmake btzero bts; ? set to zero const bts; ? hold fixed at zero lsq(silent,maxit=50) cf eqk eql eqe; param bts; ? do not hold fixed in estimations below set lr = 2*(llu-@logl); cdf(chisq,df=nbts) lr; title 'LM test (b.3)'; ? Just follow the outline in 9e6 copy @covu w0ot; lsq(wname=w0ot,maxitw=0) cf eqk eql eqe; mat neq = nrow(@covu); mat lm = @nob*neq - @tr ; cdf(chisq,df=nbts) lm; ? Summarize print @wald lr lm; title 'compute MFP as d(cf)/d(t) (c)'; ? Restore original coefficients unmake btsave bts; mfp = alphat + gtt*t + gkt*lkm + glt*llm + get*lem; print mfp; ? (c)