UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics

Economics 143 (Cameron) - Applied Regression Analysis

SHAZAM code [drycl.sha]


If you are downloading this SHAZAM code for use on your own computer, select "File", then "Save As...", and save on your own diskette (a:) or your own hard drive (c:\) using the same filename e143sh23.sha.

IMPORTANT: you must then use an editor (like TED) to delete all of the HTML code from the top and the bottom of the file, leaving only the SHAZAM code. The line which reads "* SHAZAM code (e143sh23.sha) downloaded from UCLA Econ 143 (CAMERON) WebSite" should be the first line of your edited program file. Save the edited program as drycl.sha



* SHAZAM code downloaded from UCLA Econ 143 (CAMERON) WebSite: 
* HTML file called e143sh23.htm, and should have 
*  been downloaded as drycl.sha

file 6 drycl.out

* spills = number of toxic spills at dry cleaning establishments
*  in a particular jurisdiction
* insp = number of full-time inspectors in that jurisdiction
* pen = typical legal penalty in that jurisdiction
* age = median age of establishments in that jurisdiction
* medinc = median income of households in that jurisdiction

sample 1 19
read(drycl.dat) spills insp pen age medinc

stat / pcor

* Regression 1
ols age spills insp pen medinc

* Regression 2
ols spills insp

* Regression 3
ols spills pen

* Regression 4
ols spills age

* Regression 5
ols spills medinc

* Regression 6
ols spills insp pen age medinc / auxrsqr
test insp=pen
test insp=1000*pen
confid age medinc

* Regression 7
ols spills insp pen

* Plots
plot spills / histo groups=6
plot insp pen

stop




COURSE OUTLINE LECTURE OUTLINES PROBLEM SETS PROBLEM SOLUTIONS COMPUTER LABS
SHAZAM EXAMPLES DATA SETS ONLINE QUIZZES GRAPHICS HANDOUTS

Updated: February 18, 1998
Prepared by: Trudy Ann Cameron