# lab3 - STAT5044 Lab3 Inyoung Kim Outline 1 How to check...

This preview shows pages 1–9. Sign up to view the full content.

STAT5044: Lab3 Inyoung Kim

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

View Full Document
Outline 1 How to check assumptions using R
Example A health researcher, interested in studying the relationship between diastolic blood pressure and age among healthy adult women 20 to 60 years odl, collected data on 54 subjects. (Text book 427)

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

View Full Document
Simple linear regression Simple linear fit summary(lmfit) Call: lm(formula = y ˜ x) Residuals: Min 1Q Median 3Q Max -16.47859 -5.78765 -0.07844 5.61173 19.78132 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 56.15693 3.99367 14.061 < 2e-16 *** x 0.58003 0.09695 5.983 2.05e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 8.146 on 52 degrees of freedom Multiple R-squared: 0.4077, Adjusted R-squared: 0.3963 F-statistic: 35.79 on 1 and 52 DF, p-value: 2.050e-07

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

View Full Document
Scatter plot Scatter plot 20 30 40 50 60 70 80 90 100 110 x y
Cooks distancs for influence ploints Cooks distance par(mfcol=c(2,3)) cook<-cooks.distance(lmfit) halfnorm(cook,3,ylab="Cooks dist") boxplot(cook)

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

View Full Document
Residual plot Residual plot #3.1 constant var plot(fitted(lmfit),residuals(lmfit),xlab="Fitted",ylab="Residuals") abline(h=0) plot(fitted(lmfit),abs(residuals(lmfit)),xlab="Fitted",ylab="|Residuals|" )
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