UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics

Economics 143 (Cameron) - Applied Regression Analysis

SHAZAM code [whoopie.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 e143sh22.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 (e143sh22.sha) downloaded from UCLA Econ 143 (CAMERON) WebSite" should be the first line of your edited program file. Save the edited program as whoopie.sha





* SHAZAM code downloaded from UCLA Econ 143 (CAMERON) WebSite: 

* HTML file called e143sh22.htm, and should have 

*  been downloaded as whoopie.sha



file 6 whoopie.out

* Hypothetical data on monthly demand for luxury American-made

* automobiles at a random sample of dealerships in different 

* neighborhoods.  Data include:

*   age = median age of population in same zipcode as dealership

*   inc = median household income of population in same zipcode

*   cars = average number of American-made luxury cars sold per month

*   price = price index for American-made luxury cars at dealership

*   dist = proximity to nearst foreign luxury car dealership



sample 1 17

read(whoopie.dat) age inc cars price dist



* Descriptive Statistics

stat / pcor



* Regression 1

ols age inc cars price dist



* Regression 2

ols cars price



* Regression 3

ols cars inc

test inc=20

test inc=0.05



* Regression 4

ols cars age



* Regression 5

ols cars dist



* Regression 6

ols cars inc price age dist  / auxrsqr

test inc=age 

test inc=1000*age

confid inc age



* Regression 7

ols cars inc age 



* Plots

plot cars / histo groups=5

plot inc age



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