MTH4230_Lab1(4).pdf

# Include a title in your plot using the main argument

• Lab Report
• 4

This preview shows pages 2–4. Sign up to view the full content.

Include a title in your plot using the main= argument. Include include “nice” x and y axis labels using the xlab= and ylab= argu- ments. Change the plot character using the pch= argument. To see a list of your choices, type ? points Choose a “pretty” color for the points in your plot using the col= argument. 6. Compute the mean ¯ x and standard deviation s x of the illiteracy rates and the mean ¯ y and standard deviation s y of the murder rates using the functions mean() and sd() . 2 Part B: Simple Linear Regression 2.1 Murder Rates Data Set (Continued) 1. Carry out a simple linear regression analysis with illit as the predictor and murder as the response using the lm() function, saving the lm object as myReg , by running myReg <- lm (murder ~ illit) 2. Type summary (myReg) to see the results of the regression analysis. 3. Add the least squares regression line to the scatterplot of Step 5 by running abline (myReg) 4. The object myReg is a list containing several other objects. Verify this by running 2

This preview has intentionally blurred sections. Sign up to view the full version.

is.list (myReg) 5. Type names (myReg) to see what objects are stored in myReg .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern