* Heteroskedasticity * Reference: William H. Greene, Econometric Analysis, Fourth Edition, * Prentice-Hall, 2000. * Chapter 12. SAMPLE 1 100 * TABLE A5.1 * NDR number of derogatory reports * A1 = 1 for credit card application accepted * AGE age in years * INCOME income divided by 10,000 * SPEND average monthly credit card expenditure * D1 = 1 individual owns home ; = 0 rents home * D2 = 1 self-employed READ (credit.txt) NDR A1 AGE INCOME SPEND D1 D2 * Restrict the sample to individuals with non-zero credit card expenditure. SET NOWARNSKIP SKIPIF (SPEND.LT.1) GENR INC2=INCOME*INCOME * Example 12.1 - OLS Estimation * Table 12.1, page 500 OLS SPEND AGE D1 INCOME INC2 GEN1 LLFR=\$LLF * Example 12.4 - OLS Estimation - White standard errors * Table 12.2, page 506 - line 2 OLS SPEND AGE D1 INCOME INC2 / HETCOV * Example 12.7 * Consider that the error variance is a function of income. * Weighted Least Squares - error variance proportional to income * Table 12.3, page 515 - model 2 GENR W=1/INCOME OLS SPEND AGE D1 INCOME INC2 / WEIGHT=W * Weighted Least Squares - error variance proportional to income**2 * Table 12.3, page 515 - model 3 GENR W=1/INC2 OLS SPEND AGE D1 INCOME INC2 / WEIGHT=W * Multiplicative Heteroskedasticity - Maximum Likelihood Estimation * Table 12.3, page 515 - model 9 GENR LINC=LOG(INCOME) HET SPEND AGE D1 INCOME INC2 (LINC) / MODEL=MULT * Example 12.9 * Multiplicative Heteroskedasticity - Maximum Likelihood Estimation * Table 12.4, page 521 HET SPEND AGE D1 INCOME INC2 (INCOME INC2) / MODEL=MULT GEN1 LLFU=\$LLF * Get a likelihood ratio test statistic GEN1 LR= -2*(LLFR-LLFU) * p-value -- the null hypothesis is homoskedasticity SAMPLE 1 1 DISTRIB LR / TYPE=CHI DF=2 CDF=CDF GEN1 PVALUE=1-CDF PRINT LR PVALUE STOP