{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch8_1way_part1_4pp

# ch8_1way_part1_4pp - 1-way ANOVA visual 0.25 0.20 0.15 0.10...

This preview shows pages 1–3. Sign up to view the full content.

22s:152 Applied Linear Regression Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA) ———————————————————— We now consider an analysis with only cate- gorical predictors (i.e. all predictors are factors ). Predicting height from sex (M/F) Predicting white blood cell count from treat- ment group (A,B,C) If only 1 categorical predictor of a continuous response One-Way ANOVA μ 1 μ 2 μ 3 For example, μ dem μ rep μ ind 1 1-way ANOVA visual: 0 5 10 15 20 25 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 Y In a 1-way ANOVA, we’re interested in ±nd- ing di f erences between population group means, if they exist. ——————————————————— If two categorical predictors of a continuous response Two-Way ANOVA μ 11 μ 12 μ 13 μ 21 μ 22 μ 23 For example, Factor 1 low med high Factor 2 yes no 2 1-way ANOVA (only one factor) Consider the cell means model notation: (It uses 1 parameter to represent each cell mean) Y ij = μ i + ° ij where μ i is the group i mean. If there’s only 2 levels, like in sex, then we can use a two-sample t -test H 0 : μ 1 = μ 2 . If we have more than 2 levels, we extend this t -test idea to do a 1-way ANOVA. Atw o - s amp l e t -test is essentially a 1-way ANOVA (it’s the simplest one, there’s only 2 levels to the factor) 3 Suppose we have three populations (or 3 lev- els of a categorical variable) to compare. .. Example :Doesthep resenceo fpetsorf r iends a f ect the response to stress? n =45women(a l ldoglovers) Each woman randomly assigned to one of three treatment groups as: 1) alone 2) with friend 3) with pet Their heart rate is taken and recorded during astress fu ltask . Allen, Blascovich, Tomaka, Kelsey, 1988, Journal of Personality and So- cial Psychology. 4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
>p e t s = r e a d . c s v ( " p e t s . c s v " ) >h e a d ( p e t s ) group rate 1P 6 9 . 1 6 9 2F 9 9 . 6 9 2 3P 7 0 . 1 6 9 4C 8 0 . 3 6 9 5C 8 7 . 4 4 6 6P 7 5 . 9 8 5 >a t t a c h ( p e t s ) >i s . f a c t o r ( g r o u p ) [1] TRUE The treatment groups are: ‘C’ for control group or alone . ‘F’ for with friend . ‘P’ for with pet . Consider the distribution of heart rate by treatment group. .. 5 >b o x p l o t ( r a t e ~ g r o u p ) C F P 60 70 80 90 100 >t a b l e ( g r o u p ) group CFP 15 15 15 This is a balanced 1-way ANOVA since all groups have the same number of subjects. 6 Get the mean of each group. a p p l y ( r a t e , g r o u p , m e a n ) 82.52407 91.32513 73.48307 If we consider μ 1 as the population mean heart rate of the control group, μ 2 as the population mean heart rate of the friends group, μ 3 as the population mean heart rate of the pet group, then, to test if any of the groups have a di f er- ent heart rate, we would consider the ‘overall’ null hypothesis H 0 : μ 1 = μ 2 = μ 3 H A :atleastone μ i is di f erent for i =1,2,3 7 Why not just do 3 pairwise comparisons?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

ch8_1way_part1_4pp - 1-way ANOVA visual 0.25 0.20 0.15 0.10...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online