UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics
Economics 143 (Cameron) - Applied Regression
Analysis
SHAZAM code [multicol.sha]
* SHAZAM code downloaded from UCLA Econ 143 (CAMERON) WebSite:
* HTML file called e143sh12.htm, and should have
* been downloaded as multicol.sha
*-------------------------------------------------------------
* EXAMPLE OF "HIGHER-ORDER" MULTICOLLINEARITY. PAIRWISE CORRELATIONS AMONG
* REGRESSORS AND/OR PLOTS OF PAIRS OF REGRESSORS DO NOT REVEAL ANY SERIOUS
* CORRELATIONS. NO PAIR OF VARIABLES PRESENTS A PROBLEM BUT ALL THREE
* TOGETHER SPELL TROUBLE FOR THE RESULTING ESTIMATES
sample 1 20
read(multicol.dat) y x1 x2 x3
print y x1 x2 x3
* examine pairwise correlations (not always enough to detect higher-order
* multicollinearity)
stat y x1 x2 x3 / pcor
* like stat, plots can sometimes reveal multicollinearity among regressors,
* but not all the time. check pairwise relationships among regressors here:
plot x1 x2
plot x1 x3
plot x2 x3
* check simple regressions of y on each of x1 x2 x3:
ols y x1
ols y x2
ols y x3
* do successive regressions on additional explanatory variables;
* adding a collinear regressor can destroy the statistical significance of
* variables that were added earlier
ols y x1 / anova
ols y x1 x2 / anova
ols y x1 x2 x3 / anova
* do the "auxiliary regressions" yourself; look for regressors that are
* almost perfect linear functions of other regressors (check r-squared values)
ols x1 x2 x3
ols x2 x1 x3
ols x3 x1 x2
* or, have shazam do the auxiliary regressions for you
ols y x1 x2 x3 / auxrsqr
* even though you cannot reject the zero hypothesis for individual
* coefficients, try an f-test for the overall significance of the regression
test
test x1=0
test x2=0
test x3=0
end
* check the confidence ellipses to see what is going on:
confid x1 x2 / gnu lineonly
confid x2 x3 / gnu lineonly
confid x1 x3 / gnu lineonly
* remember, SHAZAM refers to estimated coefficients on variables by the names these
* coefficients modify.
Updated: 11:17 AM 11/2/98; Prepared by: Trudy Ann Cameron; Site Index