1 / 13

Chapter 3 Linear Regression project (SAS)

Chapter 3 Linear Regression project (SAS). Thanksgiving Vacation Project. Gathering Data. We need to first gather our data…. Follow directions on worksheet!!! To collect data.

barth
Download Presentation

Chapter 3 Linear Regression project (SAS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 3 Linear Regression project (SAS) Thanksgiving Vacation Project

  2. Gathering Data • We need to first gather our data…. • Follow directions on worksheet!!! To collect data. • It will be easier to put your data in on the computer if you already have it electronically filled out (the chart that is).

  3. Getting Started with SAS • To log in, go to • https://academic93.oda.sas.com/SASWebEditor/main?locale=en_US • Use the FIRST PART of your email to log in….ie…..Mine would be • astabler (for my email astabler@wcpss.net) • IT IS….Case sensitive!!!!

  4. Putting Data into SAS • We need to copy our data into SAS now… • Copy the code on the next slide and REPLACE what is in red with YOUR data. • NOTICE: • There are NO spaces in the Names of the destinations • Also, you ONLY need to put Destination, Distance, and Cost into the code. NOT airline and departing flight number!!!!!!

  5. Putting Data into SAS title ‘Thanksgiving Vacation-Chapter 3’; data vacation; input Destination $ Distance Cost ; datalines; Orlando 1189.8 730.7 SanDiego 5090 841.6 SanJuanPuertoRico 2838 835.61 NYC 973.2 468.8 Chicago 1619.6 505.6 Seattle 5749.2 848.6 SaltLakeCity 4282.6 654.6 Boston 1399.4 635.8 Honolulu 9568 1394.74 Denver 3349.2 771.6 CancunMexico 5956.2 1350.95 ; Run; NOTE: You ONLY need to put Destination, Distance, and Cost into the code. NOT airline and departing flight number!!!!!!

  6. ScatterPlot • Since this project should be TYPED, we need to get our scatterplot for the data. • We are now working on number 5 in your project.

  7. Plotting Scatterplot • Now to plot that scatterplot…add the following code into SAS (after your datalines code) title 'Thanskgiving Vacation Distance vs Cost'; proc gplot data=vacation ; plot cost*distance= 'circle'; run; • This will give you the scatterplot for your data. You need to PRINT SCREEN this and put it into your electronic copy of your project.

  8. After the Scatterplot • Complete questions 6-11. • Question 9: To find you LSRL, you should be finding the mean and standard deviations of x and y, as well as the r coefficient. I NEED to see your work for this. You may use a calculator but I need these values for your work. • AFTER you get your LSRL by hand, check it with the parameters given for the LSRL in SAS. They should be very very close if not exact (see next slide).

  9. Getting LSRL….AFTER BY HAND • Once you’ve calculated and found your LSRL by hand….. (work must be shown)….we can use SAS to CHECK title 'Thanskgiving Vacation Project'; proc reg data=vacation plots=residualplot; model cost=distance; run; • This will give you a table that contains the parameters for your model.

  10. Plotting LSRL on Scatterplot • Question 12: • Look at the Results from the code in the previous slide. They contain a plot that shows your LSRL on your scatterplot. You NEED to include an image of this in your project (put this in space for question 12).

  11. After LSRL • Complete question 1

  12. Plotting Residuals • Now to plot the residuals • Question 14: Use the code below. proc reg data=vacation plots=residualplot; model cost=distance; run; • Put this plot into your project.

  13. Finish it up!!!! • Now that the code is done, save your SAS program (VacationProject would be a good name). • Complete the rest of the project.

More Related