
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















Numeric Response variable (
y )
p^
Numeric predictor variables (
p < n
Model:^ Y
=
β^0
β^1
x^1
⋅⋅⋅
β p
x^ p
ε
Partial Regression Coefficients:
effect (on the mean
response) of increasing the
th i predictor variable by 1
unit,
holding all other predictors constant
Model Assumptions (Involving Error terms
(^2) σ
n^
=250 cases)
p =6 explanatory variables)
x^1
, in years -- 11-14)
x^2
, units not given)
x^3
=1 if male, 0 if female)
x^4
, in weeks at birth)
x^5
, units not given)
x^6
=1,...,
<
g^
(1), 1500-
1999
g (2), 2000-
g (3), 2500-
g (4), 3000-
3499
g (5), >
g (6))
Source: Falkner, et al (2004)
Direct extension to ANOVA based on simplelinear regression
-^
Only adjustments are to degrees of freedom:^ –
DF
= R p
DF
= E n
*^
( p
*=
p +1=#Parameters)
Source ofVariation
Sum ofSquares
Degrees ofFreedom
MeanSquare
F
Model
SSR
p^
MSR
=^ SSR
/ p^
F^ =
MSR
/ MSE
Error
SSE
n - _p_*
MSE
=^ SSE
/( n -
p *)
Total
TSS
n -
SSR TSS
TSS
SSE
TSS
R^
=
−
= 2
any
of the explanatory variables are
associated with the response
-^
H
: 0 β^1
=
⋅⋅⋅
=
β
=0 (None of thep
x
s^ associated with
y
)
-^
H
: Not allA
β
= 0i
)
( : :. .
*)
/( )
(^1) (
/
:. .
, ,
2
2
obs
p n p
obs obs
F
F P
val
P
F
F
R R
p
n
R
p
R
MSRMSE
F
S T
≥
−
≥
−
−
=
=
−
α
Wish to determine whether the response isassociated with a single explanatory variable, aftercontrolling for the others
-^
(2-sided alternative) |)
| ( (^2) :
|
|: . .
:. .
, 2 / ^ ^
obs
p n
obs
i b
obs
t t P
val P
t
t
R R
s
t S T
i^ ≥
−
−
α β
Variable
b^
SE
b^
t=b/SE
b^
P-val (z)
Adolescent Age
.
Tanner Stage
<.
Male
.
Gestational Age
-0.
-0.
.
Birth Length
.
Birth Wt Grp
-0.
-1.
.
Controlling for all other predictors, adolescent age, Tanner stage, andBirth length are associated with adolescent height measurement
-^
H
: 0
=…=
p^
= 0 (After removing the
effects of
X
,…, 1
X
, none of other predictorsg
are associated with
Y
)
-^
H
: a
H
0
is false
)
( :
*]
[
1
)
(
*]
/[
)
/()
(
: TS
*) (, ,
(^22)
2
obs
p n g p
obs
r c
c
c
r
c
obs
F
F P P
F
F
RR
p n
R
g p R R p n
SSE
g p
SSR
SSR
F
≥
=
≥
−
−
−
−
=
−
−
−
=
− − α
P -value based on
F
-distribution with
p-g
and
n
-p* d.f.
Some models have both numeric and categoricalexplanatory variables (Recall
gender
in example)
If a categorical variable has
m
levels, need to create
m
dummy variables that take on the values 1 if the level ofinterest is present, 0 otherwise.
-^
The baseline level of the categorical variable is the onefor which all
m
-1 dummy variables are set to 0
The regression coefficient corresponding to a dummyvariable is the difference between the mean for thatlevel and the mean for baseline group, controlling forall numeric predictors
-^
Subjects - Visitors to National Spinal Network in 23 citiesCompleting SF-36 Form
-^
Response - Physical Function subscale (1 of 10 reported)
-^
Predictors:–
Patient’s age (
x )^1
-^
Gender (
x =1 if female, 0 if male)^2
-^
High temperature on day of visit (
x )^3
-^
Low temperature on day of visit (
x )^4
-^
Dew point (
x )^5
-^
Wet bulb (
x )^6
-^
Total precipitation (
x )^7
-^
Barometric Pressure (
x )^7
-^
Length of sunlight (
x )^8
-^
Moon Phase (new, wax crescent, 1st Qtr, wax gibbous, full moon,wan gibbous, last Qtr, wan crescent, presumably had 8-1=7dummy variables)
Source: Glaser, et al (2004)
Modeling Interactions
predictor (on the response) depends on the levelof other predictors.
product terms (case of 2 predictors):^ –
2
1
X
1
by 1 on
E
( Y
) depends
on level of
X
, unless 2
β
=0 ( 3
t -test)
Backward Elimination
Select a significance level to stay in the model (e.g.SLS=0.20, generally .05 is too low, causing too manyvariables to be removed)
-^
Fit the full model with all possible predictors
-^
Consider the predictor with lowest
t -statistic (highest
P -value).^ – If
P
> SLS, remove the predictor and fit model without this variable (must re-fit model here because partial regressioncoefficients change)
P
≤
SLS, stop and keep current model
Continue until all predictors have
-values below SLS
Forward Selection
Choose a significance level to enter the model (e.g.SLE=0.20, generally .05 is too low, causing too fewvariables to be entered)
-^
Fit all simple regression models.
-^
Consider the predictor with the highest
t -statistic (lowest
P -value)^ – If
P
≤
SLE, keep this variable and fit all two variable models
that include this predictor
P
> SLE, stop and keep previous model
Continue until no new predictors have
All Possible Regressions -
C
Fits every possible model. If
potential predictor
variables, there are 2
K -1 models.
Label the Mean Square Error for the model containingall
predictors as
K
For each model, compute
and
where p
p*
is the
number of parameters (including intercept) in model
*) 2 (^
p n
SSEMSE
C
K
p^
− −
=
C
≈ p^
p*
Regression Diagnostics
Model Assumptions:^ – Regression function correctly specified (e.g. linear)^ – Conditional distribution of
Y
is normal distribution
Y
has constant standard deviation
Y
are statistically independent
Residual plots can be used to check the assumptions^ – Histogram (stem-and-leaf plot) should be mound-shaped
(normal)
⇒
Nonlinear relation
⇒
Non-constant Variance
random cloud. If pattern appears, not independent.