Chapter 7
Transformation
7.1. Transformation
Is linear regression appropriate?
7.1. Transformation
The assumption of linear relationship does not always hold
We can transform
The predictor
The response
Both
to achieve the linear relationship
Power transfo
STAT 3008
Exercises 6
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Fill in the missing values in the following tables of regression output.
ANOVA Table
Source
Sum of Squares d.f. Mean Square F-
STAT 3008
Exercise 4
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 3.2.
3.2. Added-variable plots
This problem uses the United Nations example in Section 3.1 to demonstrate many of the p
STAT 3008
Exercises 5
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 3.1.2 and 3.1.3.
For problem 3.1.3, do also
i A F-test for the dependence of Soma on HT 9, and compare with
the t-test
STAT 3008
Exercises 3
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1.
(i) Problem 2.4.2.
(ii) Problem 2.4.3.
(iii) From the regression E(Dheight|M height) = o + 1 M height, express the relation in
Chapter 7
Transformation
7.1. Transformation
Is linear regression appropriate?
7.1. Transformation
The assumption of linear relationship does not always hold
We can transform
The predictor
The response
Both
to achieve the linear relationship
Power transfo
STAT 3008
Exercises 2
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 2.1. For 2.1.3, no need to do t-tests.
2. Problem 2.3.
3. Problem 2.4.1.
4. This problem shows the unbiasedness of the
STAT 3008
Exercise 1
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 1.2.
Mitchell data
The data shown in Figure 1.12 give average soil temperature in degrees
C at 20 cm depth in Mitchell,
Chapter 10
Variable Selection
10.1. The active terms
Variable selection
Aim: Identify the correct model
select the useful predictor
Ignore the non-informative terms
Y v.s. X1, X2, X999
Divide X=(X1, X2, X999) into two sets, XA, and XI,
so that E(Y|X) = E(
Chapter 8
Regression Diagnostic - Residuals
8.1. Regression Diagnostics
Y X e, e~N (0, 2 )
Regression diagnostic
Check if the assumptions (mean/var/error) are
consistent with the observed data.
Study the residuals
If the model works well, then the residua
STAT 3008 Applied Regression Analysis
Assignment2 Solution
5 Oct. 2013
1.
2.(i)
(ii)
(iii)
(iv)
(v)
3. The model we are considering is with the form of: (
)
(i) t-statistic=1, p-value=0.1731. The p-value is greater than
at level 0.05. It implies there is
STAT 3008
Solution of Homework 1
1.
a) x-separated point and outlier
b) y-separated point and outlier
c) x-separated point and NOT outlier
d) y-separated point and NOT outlier
In the following plots, the green line is the regression line without the speci
STAT 3008
Exercise 7
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 4.3. For the transactions data described in Section 4.6.1, dene A = (T1 + T2 )/2 to be the average transaction time, an
STAT 3008
Exercise 8
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 5.1.1, 5.1.2 and 5.1.3. (Galtons sweet peas)
Many of the ideas of regression rst appeared in the work of Sir Francis
Ga
Chapter 3
Multiple Regression
Multiple Regression
What is multiple regression?
Adding more predictors to explain the
response variable better.
Improve
by
Adding X2 to explain the part of Y that has
not already been explained by X1.
Terms and Predictors (X
Chapter 5
Weighted Least Square
5.1 Weighted Least Square (WLS)
Model
E (Y | X
xi )
' xi
2
Var (Y | X
xi )
assumed
known
wi
Alternative representation
1
w1
Y
X
e,
Var (e)
2
W
1
2
0
0
Errors are independent
but not identically
distributed
0
1
w2
0
0
0
0
0
Chapter 4
Drawing Conclusion
4.1 Understanding parameter estimates
parameters=( 0, 1, p, 2)
Unit of s:
unit of y/unit of x. (e.g. gallon/$1000 for -6.14)
Unit of
2:
(unit of y)2
Meaning of i:
Rate of change of y on xi , after adjusting for other variables
Chapter 1
Scatterplot and Regression
Motivation example 1
What is the value of gravity?
Remember this?
v=u+at
Motivation example 1
v=u+gt
Experiment
Drop sth from the top of
different buildings
Record the landing speed
and travelling time
Building
V (fina
G) :7 X: N (XK
i=l
N
'xigL/ KL. Fifi/KL 'L ithapfrfpciiiimdobaadar. E "H
File Edit Vial-e Window Help at
@E @ 133 EJ (Eh I :33 | | a; E | 9%) Q | E Tools Sign Comment;
Anal sis of variance ANOVA
ANOVA table: a break-down of squares (variation
Chi
' jomm " MM '51 relm'Ho-nslalfa Lac-hm
X& Y 5 mm- Qatari-[MK 1am: Ema nite) mm mm
1ibraryCa1r3);data(heights); x=heights
X NL
M
1ot x$Mhei ht,x$Dhei ht u l
p REFE) g ' g )oLjek "rift
'Itkl ivhgj do Gm
1mcx$oheigh ~x$Mheight)
ab1ineCa=fit$c0ef[l],b=f
-) X 31-15mm
- Mm 1 )9 = D+P x linem- l'ej
UM mbztftkslqe
J .
mmk x to m? Chtlo
If Marx) MUM? - 015
v * NM; rqPi-mk._. cfw_mm err "'aa ii'te'F'ia dfi "Elan eeaderr 'E"
File Edit View Window Help X
Tools Sign Comment
i Scatter plot shows
mean fU CtlUn 2
vMLZR'.
Xi- Y- "an erp' -IHDEEI%EBHEIFT I. '-I
File Edit View Window Help at
Sign Comment
3% 3'1) =
iHSXX/n+i2
Remrding .
00:00:00 = '1 iiap erip'gp-iaoiereieiaa err. ' "-3ch
File Edit Vial-e Window Help at
@ if E u Q I I 33 I I I Q I IEI Sign Commen
D Haw-Page]. I D Wdtamuhkaduhkkw JII: '-
' -) c cfw_E Dtha.cuhkedu.hkfcyyaufceur5ef2012F_STAT_30081Chapter0.pdf Eli? E
CLIHK Blackbeard E CUHKWebMaiI
0 Regular assignments (20%)
0 Mid term exam (30%) . . _;
0 Final exam (50%)
Remrding ,
. 00:00:00 -
STAT 3008
Exercise 9
Problems refer to the problem sets in the textbook: Applied Linear
Regression, 3rd edition by Weisberg.
1. Problem 7.1
2. Problem 7.2. (For 7.2.3, only compare two models qualitatively by
looking at the tted curve. F-test cannot compa
Chapter 9
Outlier and Influence
9.1. Outlier and Influence
Outlier
Particular case(s) that do not follow the
same model as the rest of the data
Usually no precise definition
In one sample distribution
Outlier = case of 3 s.d. away from the mean
In regres
ICALB CKCnUIJND
M
L AIgebra
l
h
Findtheinverse
E erc se
w hgmatrices.
o
4
3
3
2
H
,
>
v
,
:
7
1
and
0
B=
t
6
5
l
4
1
0
3
2
1
l
)
v
H
,
?
,
1
J
.
.
.
.
.
.
v
t
E erC Se .2.
J
J
FindthedeternInantUfthefU
.
m
0
2
,
0
0
0
0
0
1
H
l
1
:
STAT3008 Assignment 2 Solutions
STAT3008 Exercise 2 Solutions
(2011 - 2012 2nd Semester)
(2010 2011 Semester 2)
Q1.
Problem 2.1
2.1.1
R Codes:
library(alr3)
data(htwt)
plot(htwt)
With only 10 points, it is hard to determine whether a simple linear regress
Chapter 3
Multiple Regression
Multiple Regression
What
is multiple regression?
Adding more predictors to explain the
response variable better.
Improve
by
Adding X2 to explain the part of Y that has
not already been explained by X1.
Terms and Predictors (
STAT 3008
Applied Regression Analysis
Teachers
Instructor: Dr.YAU Chun Yip
Email: [email protected]
Office: Lady Shaw Building (LSB) 110
Office Hour: Mon 16:30-18:30
Tutor: Mr. Lai Chun Hei
Email: [email protected]
Office: Lady Shaw G24
Tut
Chapter 4
Drawing Conclusion
4.1 Understanding parameter estimates
parameters=(0, 1, p, 2)
Unit of s:
Unit of 2:
unit of y/unit of x. (e.g. gallon/$1000 for -6.14)
(unit of y)2
Meaning of i:
Rate of change of y on xi , after adjusting for other variables