1 / 32

Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test

Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test. Overview of GLM. Simple regression Multiple regression. Regression. ANOVA. Two categories (t-test) Multiple categories - Fixed (e.g., treatment, age)

tamarr
Download Presentation

Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test

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. Part IVThe General Linear Model. Multiple Explanatory VariablesChapter 13.3 Fixed *Random EffectsPaired t-test

  2. Overview of GLM • Simple regression • Multiple regression Regression ANOVA • Two categories (t-test) • Multiple categories • - Fixed (e.g., treatment, age) • - Random (e.g., subjects, litters) One-Way ANOVA GLM • 2 fixed factors • 1 fixed & 1 random Two-Way ANOVA Multi-Way ANOVA (e.g., Paired t-test) ANCOVA

  3. GLM: Paired t-test • Two factors (2 explanatory variables on a nominal scale) • One fixed (2 categories) • The other random (many categories) + Random factor Remove var. among units → sensitive test Fixed factor

  4. Data are means GLM | Paired t-test • Sleep data example, used by W. Gosset (1908) in the paper that introduced the t-test • Are the effects of 2 sleep inducing drugs: Hyoscyamine (Drug A) and L Hyoscine (Drug B), controlled for among subject variation, different?

  5. 1. Construct Model Response variable: T=hours of extra sleep – ratio scale Explanatory variables: 1. Drug. XD = Drug A, Drug B. Nominal scale Fixed effect 2. Subject. XS = [1,2,…,10]. Nominal scale Random effect Mean value for each subject varies randomly and is not under the control of the investigator

  6. 1. Construct Model Verbal: Hours of extra sleep depends on drug. Graphical:

  7. 1. Construct Model Verbal: Hours of extra sleep depends on drug. Graphical:

  8. 1. Construct Model Verbal: Hours of extra sleep depends on drug. Graphical:

  9. 1. Construct Model Can we have an interaction term? Let’s look at the df dfDrug = dfSubject = dfDrug*Subject = Dfresidual = Formal:

  10. 1. Construct Model Verbal: Hours of extra sleep depends on drug. Graphical:

  11. 1. Construct Model Formal: Revised Model:

  12. 2. Execute analysis lm1 <- lm(T~XS+XD, data=sleep) R: multiple ways to model random effects Instead of lm: lmer{lme4} lme{nlme} use aov() , specifying Error(subject)

  13. 2. Execute analysis • Compute • Compute mean per drug mean (TD=A)= 0.75 hs • Compute drug effect • 4. Compute mean per subject mean(TS=1)= 1.3 hs • 5. Compute subject effect • 6. Compute fits • 7. Compute residuals residuals = T - fits

  14. 2. Execute analysis

  15. 3. Evaluate model • Straight line model ok? • Errors homogeneous? • Errors normal? • Errors independent?

  16. 3. Evaluate model NA • Straight line model ok? • Errors homogeneous? • Errors normal? • Errors independent? 

  17. 3. Evaluate model NA • Straight line model ok? • Errors homogeneous? • Errors normal? • Errors independent?  

  18. 3. Evaluate model NA • Straight line model ok? • Errors homogeneous? • Errors normal? • Errors independent?  

  19. State the population and whether the sample is representative. Drugs set by experimental design  fixed effects We will infer only to those drugs Subjects, chosen at random. Hopefully from a larger population  random effects Population of all possible measurements of hours of extra sleep, given the mode of collection Infer to a population of subjects with characteristics similar to those in the study

  20. Decide on mode of inference. Is hypothesis testing appropriate? • State HA / Ho pair, test statistic, distribution, tolerance for Type I error. • Assume no interaction, i.e. effect of drug is consistent across subjects • Focus on drug effect

  21. State HA / Ho pair, test statistic, distribution, tolerance for Type I error. Test Statistic Distribution of test statitstic Tolerance for Type I error

  22. 7. ANOVA n = 20

  23. 7. ANOVA n = 20

  24. 7. ANOVA n = 20

  25. 7. ANOVA n = 20

  26. 7. ANOVA n = 20 r2 = 0.91 STATISTICAL CONTROL BUT we did this before  Ch 10.2 2 sample t-test r2 = 0.16

  27. 8. Decide whether to recompute p-valueSlight deviation from normalityn<30, p=0.0028 not near α no need to recompute

  28. Declare decision about termsOnly the fixed term was tested p=0.0028 < α =0.05 Reject H0 extra sleep depends on drug administered We did a 2 way ANOVA, also known as a paired t-test. 1 random factor 1 fixed factor with 2 levels

  29. Declare decision about terms • Paired t-test: • Calculate difference within each random category • Test if the mean diff differs from zero p=0.0028

  30. Report and interpret parameters of biological interest Means per drug, not controlled for among subject variation Confidence limits for the average difference, controlled for among subject variation

  31. Quizz 7Good luck! Clock

More Related