{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Stats 371

# Stats 371 - Stat 371 Assignment 3 Solution 1 The purpose...

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

1 Stat 371 Assignment 3 Solution 1. The purpose of this question is to review some of the tools used to assess the fit of a model and to look for outliers in the data set. To do so we use an artificial example with 50 observations on a response variate y and two explanatory variates x 1 and x 2 . The data are stored in the file ass3newq1.txt available on the course web page. The goal of the investigation is to predict y when x x 1 2 15 15 = = , . Start by fitting the model y x x r = + + + β β β 0 1 1 2 2 . a) Use plots of the estimated residuals and qq plots of the standardized residuals to determine if other terms (e.g. squares and products) or a transformation is needed. To create a nice format for your plots, you might like to use the R code par(mfrow=c(n,m)) where you select integers n and m. This creates an n x m array for the next nm plots you create. Below are plots of the estimated residuals versus the fitted values, the qq plot of the estimated residuals, the leverages and the studentized residuals from fitting the model y x x r = + + + β β β 0 1 1 2 2 . The qq plot suggests that there are too many large and small estimated residuals for the sample to be from a normal distribution. We also see some very large and small studentized residuals. We need a different model.

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

View Full Document