* SHAZAM command file for maximum likelihood estimation of * Box-Cox models with heteroskedasticity. * Reference: * Lahiri and Egy, "Joint Estimation and Testing for Functional * Form and Heteroskedasticity", * Journal of Econometrics, 15, 1981, pp.299-307. SAMPLE 1 18 * Data set from Gujarati, Basic Econometrics, Third Edition, McGraw-Hill. * Table 11.5, Research and development (RD) expenditures * for 18 industry groups in the United States, 1988 * (all data in millions of dollars). * The data are listed in increasing order of sales volume. READ SALES RD PROFIT 6375.3 62.5 185.1 11626.4 92.9 1569.5 14655.1 178.3 276.8 21869.2 258.4 2828.1 26408.3 494.7 225.9 32405.6 1083.0 3751.9 35107.7 1620.6 2884.1 40295.4 421.7 4645.7 70761.6 509.2 5036.4 80552.8 6620.1 13869.9 95294.0 3918.6 4487.8 101314.1 1595.3 10278.9 116141.3 6107.5 8787.3 122315.7 4454.1 16438.8 141649.9 3163.8 9761.4 175025.8 13210.7 19774.5 230614.5 1703.8 22626.6 293543.0 9528.2 18415.4 * OLS OLS RD PROFIT GEN1 LLF1=$LLF * Run a BOX-COX with no heteroskedasticity and set starting values * for the ML estimation DIM START 5 BOX RD PROFIT / DN COEF=BETA GEN1 LLF2=$LLF GEN1 START:1=$SIG2 GEN1 START:2=0 PRINT BETA GEN1 START:3=BETA:5 GEN1 START:4=BETA:1 GEN1 START:5=BETA:2 * Specify the dependent variable GENR Y=RD * Specify the mean equation XBETA: (B1*PROFIT+B0) * Specify the weight variable GENR Z=PROFIT * Specify the log-density of Eq. 6 in * Lahiri and Egy, "Joint Estimation and Testing for Functional * Form and Heteroskedasticity", * Journal of Econometrics, 15, 1981, pp.299-307. GENR CONST=-0.5*LOG(2*$PI) NL 1 / LOGDEN NCOEF=5 START=START EQ CONST - LOG(SIG2)/2 - (DELTA*LOG(Z))/2 + (LAMBDA-1)*LOG(Y) & - (((((Y**LAMBDA-1)/LAMBDA)-[XBETA])**2)/(2*SIG2*(Z**DELTA))) END GEN1 LLF3=$LLF * Construct a likelihood ratio (LR) test. * Test H0: linear-homoskedastic against H1: Box-Cox heteroskedasticity * The chi-square 2 d.f. critical value is 5.99. GEN1 LR1=2*(LLF3-LLF1) PRINT LR1 STOP