Programming Assignment 2
CSC 323 Data Analysis and Statistical Software
Due: 2/19/98
The car link
contains data excerpted from the Journal of Statistics Education data archive. Each observation
consists of the following variables:
- Manufacturer
- Model
- Type: Small, Sporty, Compact, Midsize, Large
- Price (in $1,000)
- City MPG (miles per gallon by EPA rating)
- Engine size (liters)
- Horsepower (maximum)
- Manual transmission: 0 - No; 1 - Yes
- Weight (pounds)
- Origin: 0 - Foreign; 1 - Domestic
- Write a SAS program to analyze this data. Your program should do the following:
- Separate the data into foreign and domestic.
- For each subset of data:
- Execute the PRINT procedure.
- Execute the CORR procedure to determine the correlation between city mpg and weight,
horsepower and engine size.
- Generate scatter plots of city mpg vs. weight; city mpg vs. horsepower and city mpg vs.
engine size.
For PROC PRINT, be sure to use labels for column headings rather than variable names. Use
names for data sets and variables that are meaningful. You should generate an appropriate title
for the output of these procedures.
- Write a short analysis (no more than two pages) of the output of your SAS program. Your
analysis should at least address the following for each subset of data:
- What can you say about the correlation coefficients.
- Identify the variable that explains the most variability in city mpg.
- Determine the functional relationship, that is the regression equation, between city mpg and the
variable identified above.
- Interpret the slope and intercept of the regression equation.