# 420Hw05ans - STAT 420 Homework#5(due Friday February 29 by...

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

STAT 420 Spring 2008 Homework #5 (due Friday, February 29, by 4:00 p.m.) 1. For the prostate data, fit a model with lpsa as the response and the other variables as predictors. a) Plot the residuals vs. the fitted values. Check the constant variance assumption for the errors. ( 4.3 (a) ) b) Make a histogram and a Normal Q-Q plot for the residuals. Check the normality assumption for the errors. ( 4.3 (b) ) a) > library(faraway) > data(prostate) > attach(prostate) > fit = lm(lpsa~lcavol+lweight+age+lbph+svi+lcp+gleason+pgg45) > plot(fit\$fitted.values,fit\$residuals) > abline(h=0,lty=2) The residuals look quite random. There's no evidence for the non-constant variance.

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

View Full Document
b) > hist(fit\$residuals) > qqnorm(fit\$residuals) There's a little evidence for non-normality, but it's not outstanding. Normality assumption seems to be fine. > shapiro.test(fit\$residuals) Shapiro-Wilk normality test data: fit\$residuals W = 0.9911, p-value = 0.7721 OR > par(mfrow=c(2,2)) > plot(fit)
2. A society of bird watchers has collected data from several towns on stork sighting ( x ) and human births ( y ) to test the widely expressed belief that storks bring babies.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

420Hw05ans - STAT 420 Homework#5(due Friday February 29 by...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online