Stat 500 Homework 4 (Solutions)
Read in data and fit the model:
> library(faraway)
> data(teengamb)
> g = lm(gamble ~ sex + status + income + verbal, data = teengamb)
> summary(g)
Coefficients:
Estimate
(Intercept) 22.55565
sex
-22.11833
status
0.05223
in
STATS 500 - Homework 5
Due Wednesday, November 9
Chapter 8, question 5 (page 131)
(a) Using the stackloss data, fit a model with stack.loss as the response and the other three variables as predictors using the following methods:
1. Least squares
2. Least
Chapter 6: Diagnostics
Stats 500, Fall 2016
Brian Thelen, University of Michigan
443 West Hall, [email protected]
1 / 52
Diagnostics
Checking error assumptions
Finding unusual points
Checking the structure of the model
2 / 52
Checking Error Assumptions
A
Chapter 7: Problems with Predictors
Stats 500, Fall 2016
Brian Thelen, University of Michigan
443 West Hall, [email protected]
1 / 28
Problems with Predictors
Errors in predictors
Change of scale
Collinearity
2 / 28
Errors in Predictors
Consider simple r
STATS 500 - Homework 3
Solutions
Problem 2 in Chapter 3 of Faraway (page 49)
Add the following additional problems.
(f ) Derive 95% confidence intervals for the regression coefficients based on the linear model analysis
carried out in (a).
(g) Construct a
STATS 500 - Homework 4
Due Wednesday, October 12, 2016
Based on Chapter 6, problem 2 (p. 97)
Using the teengamb dataset, fit a model to predict gambling expenditure from all other available variables.
(a) Perform regression diagnostics on this model to an
Chapter 9: Transformation
Stats 500, Fall 2016
Brian Thelen, University of Michigan
443 West Hall, [email protected]
1 / 24
Transformation
Transforming the response
Transforming the predictors
Why?
Nonlinearity
Heteroscedasticity
May improve fit
2 / 2
Stat 500 Homework 2 (Solutions)
The R output (only relevant part) for the fitted model is given below.
> library(faraway)
> data(teengamb)
> g<-lm(gamble~.,data=teengamb)
> summary(g)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 22.55565
Chapter 8: Problems with Errors
Stats 500, Fall 2016
Brian Thelen, University of Michigan
443 West Hall, [email protected]
1 / 36
Problems with the Error
Recall N (0, 2 I)
Unequal variance
Correlated
Heavy-tailed
2 / 36
Weighted Least Squares
Errors u
Chapter 10: Model Selection
Stats 500, Fall 2016
Brian Thelen, University of Michigan
443 West Hall, [email protected]
1 / 27
Variable Selection
Testing-based approaches
Criterion-based approaches
2 / 27
Testing-based Model Selection
Backward elimination