* * MAXIMIZE.RPF * Example of the use of MAXIMIZE for a stochastic frontier model. * RATS User's Guide, Example from Section 4.11 * * Adapted from Greene, Econometric Analysis, 6th Edition, example 16.9 * from pp 541-2. * open data TableF14-1.txt data(format=prn,org=columns) 1 25 valueadd capital labor nfirm * set logq = log(valueadd) set logk = log(capital) set logl = log(labor) * * Estimate linear regression to provide guess values. * linreg logq # constant logk logl * * Half-normal model * nonlin b0 bk bl sigma lambda compute b0=%beta(1),bk=%beta(2),bl=%beta(3) compute sigma=sqrt(%seesq),lambda=.1 frml resid = logq-b0-bk*logk-bl*logl frml frontier = eps=resid,\$ %logdensity(sigma^2,eps)+log(2*%cdf(-eps*lambda/sigma)) maximize(method=bfgs,title=\$ "Frontier Model with 1/2 Normal Errors") frontier * * Exponential model * nonlin b0 bk bl theta sigmav compute sigmav=sigma,theta=7 frml frontier = eps=resid,log(theta)+.5*theta^2*sigmav^2+theta*eps+\$ log(%cdf(-eps/sigmav-theta*sigmav)) maximize(pmethod=simplex,piters=5,method=bhhh,\$ title="Frontier Model with Exponential Errors") frontier