Multiple Linear Regression
Model Comparisons
Contrasts
Multiple Linear Regression
Steven Andrew Culpepper, Ph.D.
Department of Statistics
University of Illinois at Urbana-Champaign
sculpepp@illinois.edu
STAT 420: Methods of Applied Statistics
Spring 2013
Normal Probability Model
R Introduction
Simple Linear Regression
Inferences
Simple Linear Regression
Steven Andrew Culpepper, Ph.D.
Department of Statistics
University of Illinois at Urbana-Champaign
sculpepp@illinois.edu
STAT 420: Methods of Applied Stat
1.
Suppose the interaction model
Y = 0 + 1 x1 + 2 x2 + 3 x1 x2 +
was fit to n = 20 data points, and the following results were obtained:
sum( resid(lm( y ~ 1 ) ^ 2 )
# [1] 57
sum( resid(lm( y ~ x1 ) ^ 2 )
# [1] 40
sum( resid(lm( y ~ x2 ) ^ 2 )
# [1] 45
s
STAT 420 Name
Fall 2015 i M
Dalpiaz NetiD ~-w~-
Version A.
Exam 2
Page Earned No credit will be given
1 without supporting work.
2 Mysterious or unsupported answers will
not receive full credit. A correct answer,
4 unsupported by calculations,
STAT 420
2GR, 2UG, 3GR, 3UG
Examples for 02/09/2016 (2)
Spring 2016
A. Stepanov
# Simple Linear Regression
x = c(2,6,8,8,12,16,20,20,22,26)
y = c(58,105,88,118,117,137,157,169,149,202)
N = length(x)
# SXX, SXY, SYY
SXX = sum(x-mean(x)^2); SXX
SXY = sum(x-
STAT 420
2GR, 2UG, 3GR, 3UG
1.
x1
x2
y
0
1
11
11
5
15
11
4
13
7
3
14
Y i = 0 + 1 x i 1 + 2 x i 2 + i .,
4
1
0
i = 1, , 8.
10
4
19
5
4
16
8
2
8
Consider the following data set:
Consider the model
where
is are i.i.d. N ( 0, e2 ).
8 56 24
X X = 56 496 200