Title: Regression plus part 2
1Regression (plus) part 2
- Categorical variables in regressions
- Analysis of covariance (ANCOVA)
- Multiple tests
- P.S. remember to do readings on statistical power
for the next lab
2Regression designs
1
10
Plant size
X1
X Y 1 1.5 2 3.3 4 4.0 6 4.5 8 5.2 10 72
3Regression designs
1
10
Plant size
X1
X Y 1 1.5 2 3.3 4 4.0 6 4.5 8 5.2 10 7.2
X Y 1 0.8 1 1.7 1 3.0 10 5.2 10 7.0 10 8.5
4Regression designs
Code 0small, 1large
1
10
Plant size
X1
X Y 1 1.5 2 3.3 4 4.0 6 4.5 8 5.2 10 72
X Y 1 0.8 1 1.7 1 3.0 10 5.2 10 7.0 10 8.5
X Y 0 0.8 0 1.7 0 3.0 1 5.2 1 7.0 1 8.5
5Code 0small, 1large
Growth mSize b
Questions 1. What is mean growth of small
plants (in general)? 2. What is mean growth of
large plants? 3. What does m represent? b?
Hint use above answers
X Y 0 0.8 0 1.7 0 3.0 1 5.2 1 7.0 1 8.5
6Code 0small, 1large
Growth mSize b
If small Growth m0 b
If large Growth m1 b
X Y 0 0.8 0 1.7 0 3.0 1 5.2 1 7.0 1 8.5
Difference in growth?
7ANCOVA
- In an Analysis of Covariance, we look at the
effect of a treatment (categorical) while
accounting for a covariate (continuous)
Fertilized NP
Fertilized N
Growth rate (g/day)
Plant height (cm)
8ANCOVA
- Fertilizer treatment (X1) code as 0 N 1 NP
- Plant height (X2) continuous
Fertilized NP
Fertilized N
Growth rate (g/day)
Plant height (cm)
9ANCOVA
- Fertilizer treatment (X1) code as 0 N 1 NP
- Plant height (X2) continuous
X1 X2 Y 0 1 1.1 0 2 4.0 1 1 3.1 1 2 5.2
1 5 11.3
X1X2 0 0 1 2 5
Growth rate (g/day)
Plant height (cm)
10ANCOVA
- Fit full model (categorical treatment, covariate,
interaction) - Ym1X1 m2X2 m3X1X2 b
Fertilized NP
Fertilized N
Growth rate (g/day)
Plant height (cm)
11ANCOVA
- Fit full model (categorical treatment, covariate,
interaction) - Ym1X1 m2X2 m3X1X2 b
- Questions
- Write out equation for N only fertilizer (X1 0)
- Write out equation for NP fertilizer (X1 1)
- What differs between two equations?
- If no interaction (i.e. m3 0) what differs
between eqns?
12ANCOVA
- Fit full model (categorical treatment, covariate,
interaction) - Ym1X1 m2X2 m3X1X2 b
If X11 Ym1 m2X2 m3X2 b
Difference m1 m3X2
If no interaction m1
13ANCOVA
- Fit full model (categorical treatment, covariate,
interaction) - Test for interaction (if significant- stop!)
If no interaction, the lines will be parallel
Fertilized NP
Fertilized N
Growth rate (g/day)
Plant height (cm)
14ANCOVA
- Fit full model (categorical treatment, covariate,
interaction) - Test for interaction (if significant- stop!)
- Test for differences in intercept
m1
Fertilized NP
Fertilized N
Growth rate (g/day)
No interaction Intercepts differ
Plant height (cm)
15Bromeliad food web
c. William H. Bond
Detritus
16Experimental design
Top trophic level
X
Bromeliad complexity
17Expt. 1
Predation x complexity or complexity2 Plt0.05
18Multiple tests
Problem Because we examine the same data in
multiple comparisons, the result of the first
comparison affects our expectation of the next
comparison.
19Multiple tests
ANOVA shows at least one different, but which
one(s)?
20Multiple tests
Solution Make alpha your overall
experiment-wise error rate
T-test lt5 chance that this difference was a
fluke
affects likelihood (alpha) of finding a
difference in this pair!
21Multiple tests
Solution Make alpha your overall
experiment-wise error rate e.g. simple
Bonferroni Divide alpha by number of tests
22Multiple tests
b
Convention Treatments with a common letter are
not significantly different
a,b
a
significant
Not significant
Not significant
23(No Transcript)
24(No Transcript)