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

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

View Full Document Right Arrow Icon
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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online