/* ==============================================================*/ /* The White Heteroscedasticity Consistent Estimator Program "white.txt */ /* With Ordinary Least Square (OLS) Program as a External Procedure */ /* Programmed by Hun Myoung Park, kucc625@indiana.edu, March, 2001 */ /* ==============================================================*/ #INCLUDE ols.txt; #INCLUDE wgls.txt; OUTPUT FILE=c:\temp\white.out; OUTPUT RESET; FORMAT/RD 10,5; CLEAR ALL; /* ======================== Data Entry ==========================*/ y={.161 .172 .158 .173 .195 .217 .199 .163 .195 .231 .257 .259 .225 .241 .204}; y=y'; x={1.058 1.088 1.086 1.122 1.186 1.254 1.246 1.232 1.298 1.370 1.439 1.479 1.474 1.503 1.475, 4.40 5.15 5.37 4.99 4.16 5.75 8.82 9.31 5.21 5.83 7.40 8.64 9.31 9.44 5.99}; x=x'; t=2.179; /* 95% significant level with 12=n-k degree of freedom */ /* OLS Module ========================================*/ {anova, beta, b_se, cov, corr, r, b_ci, cipi}=ols(x, y, t); n=ROWS(x); k=ROWS(beta); I=1; PRINT; PRINT "================= OLS Outcome ================== "; PRINT " Beta Std error T for H0 Prob>|T|"; DO WHILE i <= k; PRINT beta[i] b_se[i] b_ci[i, 1] b_ci[i,2]; i=i+1; ENDO; PRINT; PRINT "Covariance" cov; /* White's GLS Module ==================================*/ {w_cov, w_se}=wgls(x, beta, r); i=1; PRINT; PRINT "================= GLS Outcome ================== "; PRINT " Beta Std error T for H0 Prob>|T|"; DO WHILE i <= k; PRINT beta[i] w_se[i, 1] w_se[i, 2] w_se[i, 3]; i=i+1; ENDO; PRINT; PRINT "Covariance" w_cov; OUTPUT OFF;