Question: Do all work in SAS: The file pharmacy.dat (below) contains information on volume of prescription sales for 20 pharmacies. Create a SAS data set using

Do all work in SAS:

The file pharmacy.dat (below) contains information on volume of prescription sales for 20 pharmacies. Create a SAS data set using formatted input and the following information:

Variable

Type

Columns

Description

pharmacy

numeric

1-2

Id number

sales

numeric

5-6

Sales per month in thousands

floor

numeric

9-12

Floor space in square feet

rxpct

numeric

15-16

Percent of floor space devoted to pharmacy

park

numeric

19-20

Number of parking spaces

center

numeric

23

1=In a shopping center

0=Not in a shopping center

Income

numeric

26-27

Per capita income in thousands of dollars

  1. Create a nice printout of the data, showing labels, translated values, and a descriptive title.
  2. Create a matrix with correlations between the fields floor, rxpct, park, and income. Also find all correlations of those 4 predictors with the response field sales. Show the original title and a secondary title stating Correlations.
  3. Create an X-Y plot for rxpct versus sales and another for park vs. sales. Also create a histogram for rxpct with both a normal and a kernel density estimate overlaid on the histogram. Secondary title should be Plots.
  4. Find the linear regression model with sales as the response and floor and income as the predictors. Are both predictors significant? Report the model.
  5. Assume that this is a random sample of pharmacies. Test to see if the number of pharmacies in shopping centers differs from the number of pharmacies not in shopping centers (hint: this is a chi-square test).
  6. Create regression models for all combinations of the predictors and report the best two variable model (use CP to make that determination). What is the adjusted R square for this model? Is floor significant in this model?

pharmacy.dat

 1 22 4900 9 40 1 18 2 19 5800 10 50 1 20 3 24 5000 11 55 1 17 4 28 4400 12 30 0 19 5 18 3850 13 42 0 10 6 21 5300 15 20 1 22 7 29 4100 20 25 0 8 8 15 4700 22 60 1 15 9 12 5600 24 45 1 16 10 14 4900 27 82 1 14 11 18 3700 28 56 0 12 12 19 3800 31 38 0 8 13 15 2400 36 35 0 6 14 22 1800 37 28 0 4 15 13 3100 40 43 0 6 16 16 2300 41 20 0 5 17 8 4400 40 46 1 7 18 6 3300 42 15 0 4 19 7 2900 45 30 1 9 20 17 2400 46 16 0 3 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!