* W.H. Greene, Econometric Analysis, Fourth Edition, 2000. SAMPLE 1 20 * Table A4.1 READ (educ.shd) / NAMES RENAME INCOME Y RENAME EDUC X * Chapter 4.9.4 * Specify the log-density of a single observation based on * Equation (4-70), p. 157. * The covariance matrix estimate is constructed by the nonlinear * estimation algorithm implemented with the NL command. NL 1 / NCOEF=1 LOGDEN EQ -LOG(BETA+X)-Y/(BETA+X) END GEN1 LLFR=$LLF * Now specify the log-density for the unrestricted model using * Equation (4-72), p. 158. NL 1 / NCOEF=2 LOGDEN PCOV COEF=BU STDERR=SE EQ -RHO*LOG(BETA+X)-LGAM(RHO)-Y/(BETA+X)+(RHO-1)*LOG(Y) END * The LGAM function gives the SHAZAM output message: * ALGORITHM USES NUMERIC DERIVATIVES * Confidence Interval CONFID RHO / NORMAL GEN1 LLFU=$LLF * Likelihood ratio test, p. 159. GEN1 LR=-2*(LLFR-LLFU) PRINT LR * Wald test, p. 159. GEN1 WALD=((BU:1-1)/SE:1)**2 PRINT WALD * Alternative method - the MLE command implements maximum likelihood * estimation for model with non-normal errors. * The default method is exponential regression. * For the MLE command the exponential density is a modified version * of Equation (4-70), p. 157. That is, the coefficient on the * explanatory variable is not constrained to the value one. MLE Y X / LM * The LM option gives some Lagrange Multiplier tests on the SHAZAM * output. STOP