This preview shows pages 1–3. Sign up to view the full content.
STAT 509 – Sections 6.36.4:
More on Regression
• Simple linear regression involves using only one
independent variable to predict a response variable.
• Often, however, we have data on several
independent
variables that may be related to the response.
• In that case, we can use a multiple linear regression
model:
Y
i
=
β
0
+
β
1
x
i
1
+
β
2
x
i
2
+ …+
β
k
x
i
k
+
ε
i
Y
i
= response value for
i
th individual
x
ij
= value of the
j
th independent variable for the
i
th
individual
β
0
= Intercept of regression equation
β
j
= coefficient of the
j
th independent variable
ε
i
=
i
th random error component
Example
(Table 6.34):
Data are measurements on 25 coal specimens.
Y
= coking heat (in BTU/pound) for
i
th specimen
X
1
= fixed carbon (in percent) for
i
th specimen
X
2
= ash (in percent) for
i
th specimen
X
3
= sulfur (in percent) for
i
th specimen
Y
i
=
β
0
+
β
1
x
i
1
+
β
2
x
i
2
+
β
3
x
i
3
+
ε
i
• We assume the random errors
ε
i
have mean 0 (and
variance
σ
2
), so that E(
Y
) =
β
0
+
β
1
x
1
+
β
2
x
2
+
β
3
x
3
.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
β
0
,
β
1
,
β
2
,
β
3
, etc., from the sample
data using the principle of least squares.
• For multiple linear regression, we will always use
software to get the estimates
b
0
,
b
1
,
b
2
,
b
3
, etc.
Fitting the Multiple Regression Model
• Given a data set, we can use R to obtain the estimates
b
0
,
b
1
,
b
2
,
b
3
, …that produce the prediction equation with
the smallest possible SS
res
=
R code for example:
> my.data < read.table(file =
"http://www.stat.sc.edu/~hitchcock/cokingheatdata.txt",
col.names=c('x1','x2','x3','y'), header=FALSE)
> attach(my.data)
> lm(y ~ x1 + x2 + x3)
Least squares prediction equation here:
• We interpret the estimated coefficient
b
j
as estimating
the predicted change in the mean response for a one
unit increase in
X
j
, given that all other independent
variables are held constant
.
• Sometimes it is not logical/possible for one predictor to
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 12/13/2011 for the course STAT 509 taught by Professor Chalmers during the Fall '08 term at South Carolina.
 Fall '08
 CHALMERS
 Linear Regression

Click to edit the document details