Presentation is loading. Please wait.

Presentation is loading. Please wait.

Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 1072.

Similar presentations


Presentation on theme: "Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 1072."— Presentation transcript:

1 Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 1072

2 Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 1072 X Y 10.8 11.7 13.0 105.2 107.0 108.5

3 Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 0 1 2 3 4 5 6 7 8 9 Growth rate Y 01 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 107.2 X Y 10.8 11.7 13.0 105.2 107.0 108.5 X Y 00.8 01.7 03.0 15.2 17.0 18.5 Code 0=small, 1=large

4 0 1 2 3 4 5 6 7 8 9 Growth rate Y 01 Plant size X1X1 X Y 00.8 01.7 03.0 15.2 17.0 18.5 Code 0=small, 1=large Growth = m*Size + b Questions on the general equation above: 1. What parameter predicts the growth of a small plant? 2. Write an equation to predict the growth of a large plant. 3. Based on the above, what does “m” represent?

5 0 1 2 3 4 5 6 7 8 9 Growth rate Y 01 Plant size X1X1 X Y 00.8 01.7 03.0 15.2 17.0 18.5 Code 0=small, 1=large Growth = m*Size + b If small Growth = m*0 + b If large Growth = m*1 + b Large - small = m Growth of small Difference in growth

6 What about “covariates”… - looking at the effect of salmon on tree growth rates Nitrogen

7 Compare tree growth around 2 streams, one with and one without salmon Growth rate (g/day) Salmon No Salmon t (9) = 0.06, p = 0.64

8 Is something else having an effect? Growth rate (g/day) Salmon No Salmon Plant height (cm)

9 In an Analysis of Covariance, we look at the effect of a treatment (categorical) while accounting for a covariate (continuous) ANCOVA Salmon No Salmon Plant height (cm) Growth rate (g/day)

10 Fertilizer treatment (X 1 ): code as 0 = No Salmon; 1 = Salmon Plant height (X 2 ): continuous ANCOVA Salmon No Salmon Plant height (cm) Growth rate (g/day)

11 Plant height (cm) Growth rate (g/day) ANCOVA X1X2Y 011.1 024.0 ::: 113.1 125.2 ::: 1511.3 X1*X2 0 : 1 2 5 ? ? Salmon No Salmon Fertilizer treatment (X 1 ): code as 0 = No Salmon; 1 = Salmon Plant height (X 2 ): continuous

12 1.Fit full model (categorical treatment, covariate, interaction) Y=m 1 X 1 + m 2 X 2 +m 3 X 1 X 2 +b ANCOVA Salmon No Salmon Plant height (cm) Growth rate (g/day)

13 ANCOVA Questions: Write out equation for No Salmon (X 1 = 0) Write out equation for Salmon (X 1 = 1) What differs between two equations? If no interaction (i.e. m 3 = 0) what differs between eqns? 1.Fit full model (categorical treatment, covariate, interaction) Y=m 1 X 1 + m 2 X 2 +m 3 X 1 X 2 +b

14 ANCOVA If X 1 =0: Y=m 1 X 1 + m 2 X 2 +m 3 X 1 X 2 +b If X 1 =1: Y=m 1 + m 2 X 2 +m 3 X 2 +b Difference: m 1 +m 3 X 2 1.Fit full model (categorical treatment, covariate, interaction) Y=m 1 X 1 + m 2 X 2 +m 3 X 1 X 2 +b Difference if no interaction: m 1 +m 3 X 2

15 Plant height (cm) Growth rate (g/day) 0 2 4 6 8 10 12 0246 Plant height (cm) Growth rate (g/day) Difference between categories…. Constant, doesn’t depend on covariate Depends on covariate = m 1 (no interaction) = m 1 + m 3 X 2 (interaction)

16 1.Fit full model (categorical treatment, covariate, interaction) 2.Test for interaction (if significant- stop!) ANCOVA If no interaction, the lines will be parallel Salmon No Salmon Plant height (cm) Growth rate (g/day)

17 1.Fit full model (categorical treatment, covariate, interaction) 2.Test for interaction (if significant- stop!) 3.Test for differences in intercepts between lines = m 1 ANCOVA No interaction Intercepts differ Plant height (cm) Growth rate (g/day) m 1

18 Multiple X variables: Both categorical …………... ANOVA One categorical, one continuous……………...ANCOVA Both continuous …………....Multiple Regression

19 Regression’s deep dark secret: Order matters! Input: heightp=0.001 weight p=0.34 agep=0.07 Input: heightp=0.001 age p=0.04 weightp=0.88 Why? In the first order, even though weight wasn’t significant, it explained some of the variation before age was tested. Common when x-variables are correlated with each other.


Download ppt "Regression designs 0 1 2 3 4 5 6 7 8 9 Growth rate Y 110 Plant size X1X1 X Y 11.5 23.3 44.0 64.5 85.2 1072."

Similar presentations


Ads by Google