UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics
Economics 143 (Cameron) - Applied Regression
Analysis
SHAZAM code [het2.sha]
* SHAZAM code downloaded from UCLA Econ 143 (CAMERON) WebSite:
* HTML file called e143sh15.htm, and should have
* been downloaded as het2.sha
sample 1 52
* in this similar data set, experience or practice
* is measured in days, not rounded to weeks
read(het2.dat) days perfect
* check how many observations there are at any given number of days
plot perfect days
* see whether accuracy increases with number of days of practice
ols perfect days / resid=e
test days=0
* try to find some approximate relationship between error variance
* and the magnitude of the days variable...
genr e2=e*e
plot e2 days
ols e2 days
genr le2=log(e2)
plot le2 days
ols le2 days
* from the above, does significant heteroscedasticity appear to be present?
* create some weights that might do the job, approximately...
genr wda=days
genr wdb=days*days
genr wdc=1/days
genr wdd=1/(days*days)
* acknowledging heteroscedasticity, does accuracy increase with days
* of practice?
ols perfect days / weight=wda
test days=0
ols perfect days / weight=wdb
test days=0
ols perfect days / weight=wdc
test days=0
ols perfect days / weight=wdd
test days=0
* try some Goldfeld-Quandt tests
sort days perfect
ols perfect days
test days=0
diagnos / het chowtest gqobs=5
Updated: 10:30 PM 11/18/98; Prepared by: Trudy Ann Cameron; Site Index