looking for stats expert who can work on sas software
Homework 5 (Due: Thursday 11/2/2017)
Everyone has to submit their own assignment. You will get out of this class what you put into it. The most knowledge will be gained by figuring out and actually doing the coding yourself. That being said, I am not opposed to you working together to help figure things out when having trouble, but no identical submissions.
Instructions for submission:
1. Upload a copy of your code (.sas file), properly commented for ease of grading, to the Carmen dropbox. The filename should be as follows: lastname_firstname_hw1_code.sas, e.g. example smith_john_hw1_code.sas. Use this naming convention for future assignments by replacing hw1 with hw2, hw3, etc…
2. In addition, submit a copy of the output, in .pdf form, also properly annotated. Indicate which problem number goes with each output. A suggestion would be to add a title that includes the problem number. Or type it in yourself after the output has been put into a Word file. The filename for the output should follow a similar format: lastname_firstname_hw1_output.pdf, e.g. example smith_john_hw1_output.pdf. Use this naming convention for future assignments by replacing hw1 with hw2, hw3, etc… Feel free to copy and paste from the results (output) window into a Word document. Please convert the output document to a .pdf file.
3. Create a shortcut at the very beginning of your program to your external datasets (the shortcut name will replace the filepath) at the very beginning using the LIBNAME statement. Use this shortcut whenever accessing external SAS data sets. IN ADDITION, use the FILENAME statement to assign a shortcut name to each external data set you will be exporting into SAS that is NOT a SAS data set (e.g. .txt, .dat, .csv, .xls, etc…). Use this shortcut name in the INFILE statement. The primary reason for this is that all the grader has to do is modify the filepath or filename at the beginning of the document according to his directory structure and then run the code as submitted.
Homework 5 (Due Thursday 11/2/2017):
1. We will make some graphs to describe new cars in 1993 (cars.sas7bdat). Read the data description by following the link below: http://www.amstat.org/publications/jse/datasets/93cars.txt Using ODS Graphics, graph the following and write a sentence or 2 describing what you see for each graph. Your explanations do not have to be in depth and if nothing of note is seen, you may state that. Title/label your graphs clearly. You will need to refer to the text and/or SAS Help in addition to our class examples to figure out how to do some of these. a. Make a histogram of the maximum horsepower. b. Overlay a histogram of city MPG with a histogram of highway MPG. Make sure your
histograms are readable (use transparency) and the bars have a width of 3 MPG. c. Make a barchart that shows the MEAN highway MPG separated by type of car. Also
have error bars with the length in standard deviations. d. Make a scatter plot of midrange price verses weight of all cars where the markers are
solid circles. e. Repeat (d) but have points separated by domestic and foreign. Make an appropriate
format for domestic/foreign so that the formatted values appear in the plot’s legend rather than 0 and 1. Make the legend appear as one column in the inside, top left corner of the plot.
f. Make a boxplot of fuel comparing domestic and foreign cars for each car type. g. Make a paneled graph of highway MPG verses length paneled by domestic/foreign.
Suppress the Domestic variable name (not its value) from appearing as part of the caption above each plot.
h. Make a scatter plot of city MPG verses length with red triangle markers that are filled in. Make your x-axis tick marks go from 140 to 230 by 15s and your y-axis from 10 to 50 by 5s. In addition draw a reference line at 35 mpg. Label the reference line.
i. EXTRA CREDIT: Make a scatter plot of midrange price verses weight of cars separated by type of car: red-filled circles for small, green-filled square for sporty, purple plus for Compact, black-filled star for Midsize, blue-filled diamond for Large and orange- filled triangle for Van. Have the legend appear as one column in the inside, top left corner of the plot. Make clearly-defined axis labels.
2. Using the café dataset on Carmen:
a. Make a series plot of the number of juices sold per day. Add an inset comment about Mar 5, 2010 (look at the data, you’ll see why).
b. Make a series plot with number of juices sold per day as a red solid line, number of coffees sold per day as a black dashed line and number of sodas sold per day as a purple dashdotdot line. Each line should be 2mm in thickness. Make sure there is a legend and it looks nice.
c. Make a scatter plot of the coffees sold per day verses the max daily temp. Include a regression line over top of the scatter plot. Suppose they take a loss if the number of coffees sold is below 10. Place a reference line at coffee=10 to visualize temp at which a loss occurs (so they shouldn’t sell) and include the label ‘Profit Bottom Line’.