BIOL 4605/7220 Ch 13.3 Paired t-test GPT Lectures Cailin Xu October 26, 2011.

Slides:



Advertisements
Similar presentations
Part IV The General Linear Model Multiple Explanatory Variables Chapter 13.4 Fixed * Random Effects Randomized block.
Advertisements

1-Way Analysis of Variance
Chapter 12 Inference for Linear Regression
Hypothesis Testing Steps in Hypothesis Testing:
Inference for Regression
REMINDER 1) GLM Review on Friday 2) Exam II on Monday.
1 SSS II Lecture 1: Correlation and Regression Graduate School 2008/2009 Social Science Statistics II Gwilym Pryce
Part III The General Linear Model Chapter 9 Regression.
Objectives (BPS chapter 24)
© 2010 Pearson Prentice Hall. All rights reserved Least Squares Regression Models.
ANOVA notes NR 245 Austin Troy
Lecture 23: Tues., Dec. 2 Today: Thursday:
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
BCOR 1020 Business Statistics Lecture 28 – May 1, 2008.
PSY 307 – Statistics for the Behavioral Sciences
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
Pengujian Parameter Koefisien Korelasi Pertemuan 04 Matakuliah: I0174 – Analisis Regresi Tahun: Ganjil 2007/2008.
Lecture 9: One Way ANOVA Between Subjects
Chapter Topics Types of Regression Models
Introduction to Probability and Statistics Linear Regression and Correlation.
Quantitative Business Analysis for Decision Making Simple Linear Regression.
Simple Linear Regression and Correlation
Chapter 7 Forecasting with Simple Regression
Linear Regression/Correlation
Multiple Linear Regression Response Variable: Y Explanatory Variables: X 1,...,X k Model (Extension of Simple Regression): E(Y) =  +  1 X 1 +  +  k.
Inference for regression - Simple linear regression
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 12-1 Chapter 12 Simple Linear Regression Statistics for Managers Using.
Chapter 11 Simple Regression
Today: Quizz 8 Friday: GLM review Monday: Exam 2.
BPS - 3rd Ed. Chapter 211 Inference for Regression.
Inference for Linear Regression Conditions for Regression Inference: Suppose we have n observations on an explanatory variable x and a response variable.
Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test.
Comparing Two Population Means
OPIM 303-Lecture #8 Jose M. Cruz Assistant Professor.
© 2003 Prentice-Hall, Inc.Chap 13-1 Basic Business Statistics (9 th Edition) Chapter 13 Simple Linear Regression.
PSY 307 – Statistics for the Behavioral Sciences Chapter 16 – One-Factor Analysis of Variance (ANOVA)
Applied Quantitative Analysis and Practices LECTURE#23 By Dr. Osman Sadiq Paracha.
Part III The General Linear Model Chapter 10 GLM. ANOVA.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
BIOL 4605/7220 GPT Lectures Cailin Xu October 12, 2011 CH 9.3 Regression.
Introduction to Probability and Statistics Thirteenth Edition Chapter 12 Linear Regression and Correlation.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Lesson Multiple Regression Models. Objectives Obtain the correlation matrix Use technology to find a multiple regression equation Interpret the.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
Analysis of Variance (One Factor). ANOVA Analysis of Variance Tests whether differences exist among population means categorized by only one factor or.
Copyright ©2011 Brooks/Cole, Cengage Learning Inference about Simple Regression Chapter 14 1.
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Lecture 10: Correlation and Regression Model.
Multiple Regression. Simple Regression in detail Y i = β o + β 1 x i + ε i Where Y => Dependent variable X => Independent variable β o => Model parameter.
Review Lecture 51 Tue, Dec 13, Chapter 1 Sections 1.1 – 1.4. Sections 1.1 – 1.4. Be familiar with the language and principles of hypothesis testing.
Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis.
Chapter 12: Correlation and Linear Regression 1.
Chapter 10 Inference for Regression
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
1 Testing Statistical Hypothesis The One Sample t-Test Heibatollah Baghi, and Mastee Badii.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
BPS - 5th Ed. Chapter 231 Inference for Regression.
F73DA2 INTRODUCTORY DATA ANALYSIS ANALYSIS OF VARIANCE.
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
Inference about the slope parameter and correlation
Regression and Correlation
Chapter 14 Inference on the Least-Squares Regression Model and Multiple Regression.
Regression Analysis: Statistical Inference
Statistics for Managers using Microsoft Excel 3rd Edition
Simple Linear Regression - Introduction
CHAPTER 29: Multiple Regression*
PENGOLAHAN DAN PENYAJIAN
Basic Practice of Statistics - 3rd Edition Inference for Regression
Presentation transcript:

BIOL 4605/7220 Ch 13.3 Paired t-test GPT Lectures Cailin Xu October 26, 2011

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

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

GLM: Paired t-test  Effects of two drugs (A & B) on 10 patients  Fixed factor: drugs (2 categories: A & B)  Random factor: patients (10)  Remove individual variation (more sensitive test) An Example:

GLM: Paired t-test Hours of extra sleep (reported as averages) with two Drugs (A & B), each administered to 10 subjects Response variable: T = hours of extra sleep Explanatory variables: drug & subject DataData:  Fixed  Nominal scale (A & B)  Random  Nominal scale (0, 1, 2,..., 9)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair ANOVA Recompute p-value? Declare decision:Report & Interpr.of parameters Yes No

General Linear Model (GLM) --- Generic Recipe Construct model  Verbal model Hours of extra sleep (T) depends on drug ( )  Graphical model (Lecture notes Ch13.3, Pg 2)Graphical model  Formal model (dependent vs. explanatory variables) GLM form: Exp. Design Notation: FixedRandomInteractive

General Linear Model (GLM) --- Generic Recipe Construct model  Formal model GLM form: FixedRandomInteractive effect GLM form: - Appears little/no - Limited data - Assume no FixedRandom Break

General Linear Model (GLM) --- Generic Recipe Construct model Execute model  Place data in an appropriate formatformat  Execute analysis in a statistical pkg: Minitab, R Minitab: MTB> GLM ‘T’ = ‘XD’ ‘XS’; SUBC> fits c4; SUBC> resi c5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANOVA table, fitted values, residuals | (more commands to obtain parameter estimates)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model  Place data in an appropriate format  Execute analysis in a statistical pkg: Minitab, R Minitab: MTB> means ‘T’ MTB> ANOVA ‘T’ = ‘XD’ ‘XS’; SUBC> means ‘XD’ ‘XS’.

XDNMeans Drug effect (fixed) XSNMeans Subject effect (random) Output from Minitab Means minus grand mean = parameter estimates for subjects

General Linear Model (GLM) --- Generic Recipe Construct model Execute model  Place data in an appropriate format  Execute analysis in a statistical pkg: Minitab, R Minitab: R: library(lme4) model <- lmer(T ~ XD + (1|XS), data = dat) fixef(model) fitted(model) residuals(model)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption -- No line fitted, so skip

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption  Homogeneous residuals? -- res vs. fitted plot (Ch 13.3, pg 4: Fig.1) -- Acceptable (~ uniform) band; no cone (skip) (√)(√)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption  Homogeneous residuals?  If n small, assumptions met? (skip) (√)(√)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption  Homogeneous residuals?  If n (=20 < 30) small, assumptions met? 1) residuals homogeneous? 2) sum(residuals) = 0? (yes, least squares) (skip) (√)(√) (√)(√) (√)(√)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption  Homogeneous residuals?  If n (=20 < 30) small, assumptions met? 1) residuals homogeneous? 2) sum(residuals) = 0? (least squares) 3) residuals independent? (Pg 4-Fig.2; pattern of neg. correlation, because every value within A, a value of opposite sign within B) (Pg 4-Fig.3; res vs. neighbours plot; no trends up or down within each drug)res vs. neighbours plot (skip) (√)(√) (√)(√) (√)(√) (√)(√)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model (Residuals)  Straight line assumption  Homogeneous residuals?  If n small, assumptions met? 1) residuals homogeneous? 2) sum(residuals) = 0? (least squares) 3) residuals independent? 4) residuals normal? - Residuals vs. normal scores plot (straight line?)Residuals vs. normal scores plot (Pg 4-Fig. 4) (YES, deviation small) (skip) (√)(√) (√)(√) (√)(√) (√)(√) (√)(√)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? All measurements of hours of extra sleep, given the mode of collection 1). Same two drugs 2). Subjects randomly sampled with similar characteristics as in the sample

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? Research question: Do drugs differ in effect, controlling for individual variation in response to the drugs? Hypothesis testing is appropriate

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair Hypothesis for the drug term: (not interested in whether subjects differ) Yes

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair Hypothesis for the drug term: (not interested in whether subjects differ)  Test statistic: F-ratio  Distribution of test statistic: F-distribution  Tolerance of Type I error: 5% (conventional level) Yes

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair ANOVA Yes

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA df : (20-1) = ? + ? + ? = (2-1) + (10-1) + (19-1-9) =

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total

General Linear Model (GLM) --- Generic Recipe Calculate & partition df according to model ANOVA Table ANOVA df : 19 = SourcedfSSMSFp Drug Subject Res Total MTB > cdf 16.5; SUBC> F 1 9. R: x P( X <= x ) 1-pf(16.5,1,9)

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair ANOVA Recompute p-value? Yes  Deviation from normal small  p-value far from 5%  No need to recompute

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair ANOVA Recompute p-value? Declare decision: Yes

General Linear Model (GLM) --- Generic Recipe Construct model Execute model Evaluate model State population; is sample representative? Hypothesis testing? State pair ANOVA Recompute p-value? Declare decision:Report & Interpret parameters Yes No

General Linear Model (GLM) --- Generic Recipe Report parameters & confidence limits  Subject: random factor, means of no interest  Drug effects ( ) S.E. Lower limit Upper limit hours 2.03 hours hours 3.76 hours  C.L. overlap, because subject variation is not controlled statistically

Paired t-test --- Alternative way  Calculate the difference within each random categorydifference  t-statistic S.E. L U hours 2.46 hours  Strictly positive, significant difference between the drugs  Current example

SubjectDrug ADrug B DataData (hours of extra sleep)

Graphical model

Data formatData format in Minitab & R TXDXS

SubjectDrug ADrug BDiffFitsRes DataData (hours of extra sleep)