1 / 43

An alysis O f Va riance

An alysis O f Va riance. Review Preview ANOVA F test One-way ANOVA Multiple comparison Two-way ANOVA. R eview. Standard normal distribution. Z value: (Observed - Expected ) in terms of UNITS of SD. R eview. For large n,. X. Central Limit Theorem. The beauty of CLT:

jess
Download Presentation

An alysis O f Va riance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Analysis Of Variance • Review • Preview • ANOVA • F test • One-way ANOVA • Multiple comparison • Two-way ANOVA

  2. Review Standard normal distribution • Z value: • (Observed - Expected) in terms of UNITS of SD

  3. Review For large n, X Central Limit Theorem • The beauty of CLT: • Easy to calculate V • The ugliness of CLT: • Hard to explain p

  4. Review Sampling Distribution of

  5. Review Population & Sampling Distribution • Please add yourself:

  6. STATISTICS Review Flowchart of 2G MD test

  7. ANOVA Analysis of Variance

  8. ANOVA Analysis of Variance • The logic of ANOVA • Partition of sum of squares • F test • One way ANOVA • Multiple comparison • Two way ANOVA • Interaction and confounding

  9. ANOVA B A Eyeball test for 3-sample means 1 2 3 1 2 3 • Using 95% Confidence Limits • A: Non-Significant • B:Significant • Why? • Between group variation • Within group variation • Why not do 2-s test 3 times? • Alpha error inflated • Ex: 7 groups MD comparisons • 1 / 21 < 0.05 !!

  10. ANOVA Data sheet: k groups MD comparison

  11. ANOVA The Logic of one-way ANOVA • Total Difference divided into two parts • (Observed-group mean)+(group mean-grand mean) •  • Total sum of squares divided into two parts • SS Total = SS Between + SS Within (or Error) SST = SSB + SSE •  • Partition of TD & TSS • Model of one-way ANOVA •  B C A

  12. Assumptions in ANOVA • Normal Distribution: Y values in each group • Not very important, esp. for large n • If not ND and small n: Kruskal-Wallis nonparametric • Equal variance: homogeneity • If not: data transformation or ask for help • Random & independent sample

  13. ANOVA F test: variance ratio test • Review: • F test for equal variance in 2-s t test • F test:F=V1/V2 • The larger V is divided by the smaller V • If two variances are about equal, the ratio is about 1 • The critical value of F distribution depends on DFs • ANOVA for mean difference, k groups • Null hypothesis: 1=2 =3=…=k • Variance Between / Variance within • If F is about to 1, it’s meaningless for grouping

  14. ANOVA Sir Ronald Aylmer Fisher 1890-1962 F test : named after Fisher • Characteristics • a sickly, poor-eyesighted child • The teacher used no paper/pencil to teach him • Very strong instinct on geometry • Mathematicians take years to prove his formulas • Persistence • Calculation of ANOVA tables takes Fisher 8 months, 8h/D to finish!! • Reference: • The lady tasting tea, Salsburg, 2001 • 「統計,改變了世界」天下,2001

  15. ANOVA One-way ANOVA

  16. ANOVA One-way ANOVA table • F test:

  17. ANOVA Multiple Comparison • Definition: • Contrast btw 2 means: 12 • More than 2 means is OK: [(1 2 )/2]c • Compare the overall effect of the drug with that of placebo • Contrast Coefficients: add to 0 • Orthogonal • Two contrasts are orthogonal if they don’t use the same information • Ex: (12) and (34), i.e. the questions asked are INDEPENDENT • Types of MC: before or after ANOVA • Priori(planned) comparisons • post hoc(posteriori) comparisons

  18. ANOVA Example 1: one-way ANOVA • Research problem: • Life events, depressive symptoms, and immune function. Irwin M. Am J Psychiatry, 1987; 144:437-441 • Subjects: women whose husbands • treated for lung Ca. • died of lung Ca. in the preceding 1-6 Months • were in good health • X: grouping by scores for major life events • Measurement: Social Readjustment Rating Scale score • Y: immune system function • NK cell activity: lytic units

  19. Printout Box plot & Error bar plot

  20. Printout ANOVA table

  21. Printout Nonparametric ANOVA

  22. ANOVA MC: Priori comparisons • t test for orthogonal comparisons • t statistic: ; not using SDp but MSE • DF: (n1+n2j); n=n1=n2 • Adjusting  downward:  / (group number) • Ex: 4 comparisons, =0.05/4=0.0125 • Bonferroni t procedure • Applicable for both orthogonal & non-orthogonal • t statistic: • Multiplier table: no. of comparisons & DF for MSE • Able to find CI for mean difference

  23. ANOVA 24.63 22.17 2.46 MOD n=12 HIGH n=12 LOW n=13 MC: Posteriori comparisons • Tukey’s HSD (honestly significant difference) • HSD= • Like Bonferroni, HSD multiplier table is needed (P176, table 7-7) • Able to find CI for mean difference • Ex:

  24. ANOVA MC: Posteriori comparisons • Scheffé’s procedure • S statistic: • j: No. of groups; C: contrast; (alpha, df1, df2)=(0.01, 2, 34) • most versatile (not only pair-wise) & most conservative • EX: Low (Moderate & High) combined; Low Moderate • Note: MD btw L&Hnot significant • Able to find CI for mean difference

  25. ANOVA same as HSD 2 Steps 2 Steps 3 Steps MC: Posteriori comparisons • Newman-Keuls procedure • NK statistic: • Multiplier table is needed • Less conservative than Tukey’s HSD • Unableto find CI for mean difference • Ex:2 steps ; 3 steps

  26. ANOVA MC: Posteriori comparisons • Dunnett’s procedure • Dunnett’s statistic: • Only used in several Tx means with single CTL mean • Relatively low critical value • Ex: • 2 units lower than HSD value; • 4 units lower than Scheffévalue

  27. ANOVA Other posteriori comparisons • Duncan’s new multiple-range test • Same principle as NK test; but with smaller multiplier • Least significant difference, LSD • Use t distribution corresponding to the No. of DF for MSE •  levels are inflated. • Proposed by Fisher • The above two procedures are NOT recommended by statisticians for medical research.

  28. ANOVA Summary of Multiple Comparisons • Don’t care about the formulas • Which procedure is better? depends on you! • Pairwise comparisons: • Tukey’s test: the first choice; Newman-Keuls test: second choice • Several Txs with single CTL: • Dunnett’s is the best • Non-pairwise comparisons: • Scheffé is the best • When  larger than 0.05 is OK to you: e.x., drug screening • LSD, Duncan’s new multiple-range test are O.K. • The above two are not recommended by the authors

  29. Printout Multiple comparisons

  30. ANOVA Two-way ANOVA

  31. ANOVA The Logic of two-way ANOVA • SST divided into 3 or 4 parts • SST = SSR + SSC + SSE • SST = SSR + SSC + SS(RC) +SSE • Models of two-way ANOVA • Without interaction: • With interaction:

  32. 第一天 第二天 ANOVA 第一櫃(大人) 第二櫃(小孩) 兩櫃一起 紅色 黑色 紅色 黑色 紅色 黑色 合適 9 17 3 1 12 18 不合適 1 3 17 9 18 12 Total 10 20 20 10 30 30 90% 85% 15% 10% 40% 60% Simpson’s Paradox: 陳小姐買帽子

  33. ANOVA Statistical Interaction & confounding • Interaction: 2 lines with different slope C0 C1 C1 • Confounding: 2 parallel lines Y C0 • How to test: ANOVA T0 T1

  34. ANOVA Obesity MI Cholesterol Confounding factors • Mixing effect of X2 with X1 & Y • Definition: • Associated With the disease of interest in the absence of exposure • 本身單獨與疾病有相關;本身是危險因子 • Associated With the exposure • 與危險因子有相關 • Not as a result of being exposed. • 干擾不能是中介變項:intervening variable • Intervening variable: X1X2Y • Example: S/S of diseases

  35. ANOVA Interaction & confounding • Interaction: • The effect of X1 varies with the level of X2 • A phenomenon you have to present • Main effects of X1, X2: not meaningfulanymore • Ex:X1(Sex), X2(teaching method) & Y (language score) • Confounding: • Given condition: no interaction • A condition you have to control (or adjust)

  36. ANOVA Two-way ANOVA table

  37. ANOVA Example 2: two-way ANOVA • Research problem: • Glucose tolerance, insulin secretion, insulin sensitivity and glucose effectiveness in normal and overweight hyperthyroid women. Gonzalo MA. Clin Endocrinol, 1996;45:689-697 • X1: BMI; X2: thyroid function • All categorical variables • BMI: 2 level; thyroid function: 2 level; • Y: Insulin sensitivity • Continuous variable

  38. Printout Box plot & Error bar plot, ex 2

  39. Printout Descriptive statistics, ex 2

  40. Printout 2-way ANOVA table, ex 2

  41. Summary Flowchart of 3G MD test 3 or more groups

  42. QUIZ • Q: Can I use ANOVA to test 2G MD? • A: Yes, you can. • Q: What is the relationship btw ANOVA & 2-s t? • A: 2-s t test is a special case of ANOVA • F, t & Z table:

  43. Home Work • Chapter 7, exercise 7, (table 7-20, p187) • Analysis of phenotypic variation in psoriasis as a function of age at onset and family history. Arch. Dermatol. Res. 2002;294:207-213 • Answering the following questions: • Is there a difference in %TBSA (percent of total body surface area affected) related to age at onset? • Is there a difference in %TBSA related to type of psoriasis (familial vs. sporadic)? • Is the interaction significant? • What is your conclusion?

More Related