COOK-WEISBERG HETEROSCEDASTICITY TEST, BOX-COX TRANSFORMATION & ROBUST STANDARD ERRORS ESTIMATION IN STATA USING THE AFIFI & CLARK DATA (survey2b.dta) . regress total age female l10inc educatn cath jewi none Source | SS df MS Number of obs = 256 ---------+------------------------------ F( 7, 248) = 5.93 Model | 2902.84482 7 414.692117 Prob > F = 0.0000 Residual | 17338.9052 248 69.9149403 R-squared = 0.1434 ---------+------------------------------ Adj R-squared = 0.1192 Total | 20241.75 255 79.3794118 Root MSE = 8.3615 ------------------------------------------------------------------------------ total | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- age | -.0808702 .033446 -2.418 0.016 -.1467446 -.0149959 female | 2.47536 1.091627 2.268 0.024 .3253179 4.625402 l10inc | -5.842862 1.826501 -3.199 0.002 -9.440294 -2.24543 educatn | -.7667787 .43635 -1.757 0.080 -1.626203 .0926456 cath | .9409021 1.438833 0.654 0.514 -1.892989 3.774793 jewi | 4.955468 1.915932 2.586 0.010 1.181895 8.729041 none | 3.544925 1.403983 2.525 0.012 .7796742 6.310176 _cons | 19.77625 3.083963 6.413 0.000 13.70215 25.85034 ------------------------------------------------------------------------------ . hettest Cook-Weisberg test for heteroscedasticity using fitted values of total Ho: Constant variance chi2(1) = 18.82 Prob > chi2 = 0.0000 . boxcox total age female l10inc educatn cath jewi none, model(lhs) lrtest nolog nologlr total contains observations that are not strictly positive r(411); . replace total1=total+1 (0 real changes made) . * add 1 to remove avoid zero values of y . * now try boxcox again . boxcox total1 age female l10inc educatn cath jewi none, model(lhs) lrtest nolog nologlr Fitting comparison model Fitting full model Fitting comparison models for LR tests Number of obs = 256 LR chi2(7) = 37.27 Log likelihood = -822.29369 Prob > chi2 = 0.000 ------------------------------------------------------------------------------ total1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- /theta | .2235673 .0585913 3.82 0.000 .1087305 .3384041 ------------------------------------------------------------------------------ Estimates of scale-variant parameters ------------------------------------------------------------- | Coef. chi2(df) P>chi2(df) df of chi2 -------------+----------------------------------------------- Notrans | age | -.012992 5.705 0.017 1 female | .3565312 4.041 0.044 1 l10inc | -1.033289 11.954 0.001 1 educatn | -.0932001 1.735 0.188 1 cath | .3511682 2.261 0.133 1 jewi | .7906713 6.414 0.011 1 none | .5394196 5.570 0.018 1 _cons | 4.2699 -------------+----------------------------------------------- /sigma | 1.352151 ------------------------------------------------------------- --------------------------------------------------------- Test Restricted LR statistic P-Value H0: log likelihood chi2 Prob > chi2 --------------------------------------------------------- theta = -1 -1015.4948 386.40 0.000 theta = 0 -829.57674 14.57 0.000 theta = 1 -902.83619 161.08 0.000 --------------------------------------------------------- . regress total age female l10inc educatn cath jewi none, robust Regression with robust standard errors Number of obs = 256 F( 7, 248) = 5.00 Prob > F = 0.0000 R-squared = 0.1434 Root MSE = 8.3615 ------------------------------------------------------------------------------ | Robust total | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- age | -.0808702 .0333674 -2.424 0.016 -.1465898 -.0151507 female | 2.47536 .9814813 2.522 0.012 .5422586 4.408462 l10inc | -5.842862 1.987811 -2.939 0.004 -9.758006 -1.927718 educatn | -.7667787 .4528161 -1.693 0.092 -1.658634 .1250768 cath | .9409021 1.289178 0.730 0.466 -1.59823 3.480035 jewi | 4.955468 1.672933 2.962 0.003 1.6605 8.250435 none | 3.544925 1.551311 2.285 0.023 .4895011 6.600349 _cons | 19.77625 3.283135 6.024 0.000 13.30986 26.24263 ------------------------------------------------------------------------------ . regress total age female l10inc educatn cath jewi none, hc2 Regression with robust standard errors Number of obs = 256 F( 7, 248) = 4.91 Prob > F = 0.0000 R-squared = 0.1434 Root MSE = 8.3615 ------------------------------------------------------------------------------ | Robust HC2 total | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- age | -.0808702 .0334024 -2.421 0.016 -.1466587 -.0150818 female | 2.47536 .9829884 2.518 0.012 .5392901 4.41143 l10inc | -5.842862 2.002267 -2.918 0.004 -9.786479 -1.899245 educatn | -.7667787 .4541611 -1.688 0.093 -1.661283 .1277259 cath | .9409021 1.290845 0.729 0.467 -1.601515 3.483319 jewi | 4.955468 1.69829 2.918 0.004 1.610557 8.300379 none | 3.544925 1.553713 2.282 0.023 .4847701 6.60508 _cons | 19.77625 3.309339 5.976 0.000 13.25825 26.29424 ------------------------------------------------------------------------------ . regress total age female l10inc educatn cath jewi none, hc3 Regression with robust standard errors Number of obs = 256 F( 7, 248) = 4.67 Prob > F = 0.0001 R-squared = 0.1434 Root MSE = 8.3615 ------------------------------------------------------------------------------ | Robust HC3 total | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- age | -.0808702 .0339777 -2.380 0.018 -.1477919 -.0139486 female | 2.47536 1.000381 2.474 0.014 .5050341 4.445686 l10inc | -5.842862 2.049627 -2.851 0.005 -9.879758 -1.805967 educatn | -.7667787 .4628591 -1.657 0.099 -1.678415 .1448573 cath | .9409021 1.313305 0.716 0.474 -1.645751 3.527555 jewi | 4.955468 1.752154 2.828 0.005 1.504469 8.406467 none | 3.544925 1.581131 2.242 0.026 .430768 6.659082 _cons | 19.77625 3.390086 5.834 0.000 13.09921 26.45328 ------------------------------------------------------------------------------ . * 18 Apr 2006