10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linear regression 271should be appropriate <strong>for</strong> the mean value of the y i , and the error distribution should benormally distributed and independent.Just as we looked at graphical evidence when investigating assumptions aboutnormally distributed populations when per<strong>for</strong>ming a t-test, we will consider graphicalevidence to assess the appropriateness of a regression model <strong>for</strong> the data. Four of thegraphs we consider are produced by using the plot () function as an extractor function <strong>for</strong>lm () function. Others we can produce as desired.The biggest key to the aptness of the model is found in the residuals. The residuals arenot an i.i.d. sample, as they sum to a and they do not have the same variance. Thestandardized residuals rescale the residuals to have unit variance. These appear in someof the diagnostic plots provided by plot ().Figure 10.3 Four graphs showingproblematic linear models.Scatterplot in upper left showslinear model is incorrect. Fittedversus residual plot in upper rightshows a nonlinear trend. Fittedversus residual plot in lower leftshows nonconstant variance. Lag

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!