Experimental Statistics - week 9

Slides:



Advertisements
Similar presentations
Topic 12: Multiple Linear Regression
Advertisements

A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
Chapter 12 Simple Linear Regression
Correlation and regression Dr. Ghada Abo-Zaid
Analysis of Variance Compares means to determine if the population distributions are not similar Uses means and confidence intervals much like a t-test.
Correlation & Regression Chapter 10. Outline Section 10-1Introduction Section 10-2Scatter Plots Section 10-3Correlation Section 10-4Regression Section.
EPI 809/Spring Probability Distribution of Random Error.
Chapter 12 Simple Linear Regression
Creating Graphs on Saturn GOPTIONS DEVICE = png HTITLE=2 HTEXT=1.5 GSFMODE = replace; PROC REG DATA=agebp; MODEL sbp = age; PLOT sbp*age; RUN; This will.
Multiple regression analysis
Fall 2006 – Fundamentals of Business Statistics 1 Chapter 13 Introduction to Linear Regression and Correlation Analysis.
1 Review of Correlation A correlation coefficient measures the strength of a linear relation between two measurement variables. The measure is based on.
Linear Regression and Correlation Analysis
Chapter 13 Introduction to Linear Regression and Correlation Analysis
SIMPLE LINEAR REGRESSION
Chapter 14 Introduction to Linear Regression and Correlation Analysis
Correlation and Regression Analysis
Relationships Among Variables
SIMPLE LINEAR REGRESSION
Introduction to Linear Regression and Correlation Analysis
MAT 254 – Probability and Statistics Sections 1,2 & Spring.
1 Experimental Statistics - week 7 Chapter 15: Factorial Models (15.5) Chapter 17: Random Effects Models.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
© 2002 Prentice-Hall, Inc.Chap 14-1 Introduction to Multiple Regression Model.
1 Experimental Statistics - week 6 Chapter 15: Randomized Complete Block Design (15.3) Factorial Models (15.5)
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation Note: Homework Due Thursday.
Regression For the purposes of this class: –Does Y depend on X? –Does a change in X cause a change in Y? –Can Y be predicted from X? Y= mX + b Predicted.
Introduction to Linear Regression
Chap 12-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 12 Introduction to Linear.
Testing Multiple Means and the Analysis of Variance (§8.1, 8.2, 8.6) Situations where comparing more than two means is important. The approach to testing.
Copyright © Cengage Learning. All rights reserved. 12 Simple Linear Regression and Correlation
EQT 373 Chapter 3 Simple Linear Regression. EQT 373 Learning Objectives In this chapter, you learn: How to use regression analysis to predict the value.
STAT 1301 Chapter 8 Scatter Plots, Correlation. For Regression Unit You Should Know n How to plot points n Equation of a line Y = mX + b m = slope b =
5-5 Inference on the Ratio of Variances of Two Normal Populations The F Distribution We wish to test the hypotheses: The development of a test procedure.
Relationship between two variables Two quantitative variables: correlation and regression methods Two qualitative variables: contingency table methods.
6-1 Introduction To Empirical Models Based on the scatter diagram, it is probably reasonable to assume that the mean of the random variable Y is.
The Completely Randomized Design (§8.3)
1 Experimental Statistics - week 14 Multiple Regression – miscellaneous topics.
Topic 30: Random Effects. Outline One-way random effects model –Data –Model –Inference.
PSYC 3030 Review Session April 19, Housekeeping Exam: –April 26, 2004 (Monday) –RN 203 –Use pencil, bring calculator & eraser –Make use of your.
Lecture 10: Correlation and Regression Model.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Experimental Statistics - week 12 Chapter 12: Multiple Regression Chapter 13: Variable Selection Model Checking.
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
Topic 24: Two-Way ANOVA. Outline Two-way ANOVA –Data –Cell means model –Parameter estimates –Factor effects model.
1 Experimental Statistics Spring week 6 Chapter 15: Factorial Models (15.5)
Experimental Statistics - week 3
One-Way Analysis of Variance Recapitulation Recapitulation 1. Comparing differences among three or more subsamples requires a different statistical test.
Chapter 7 Calculation of Pearson Coefficient of Correlation, r and testing its significance.
Chapter 12 Simple Linear Regression n Simple Linear Regression Model n Least Squares Method n Coefficient of Determination n Model Assumptions n Testing.
1 1 Slide The Simple Linear Regression Model n Simple Linear Regression Model y =  0 +  1 x +  n Simple Linear Regression Equation E( y ) =  0 + 
1 Experimental Statistics - week 13 Multiple Regression Miscellaneous Topics.
Lecture 10 Introduction to Linear Regression and Correlation Analysis.
Significance Tests for Regression Analysis. A. Testing the Significance of Regression Models The first important significance test is for the regression.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
1 Experimental Statistics - week 12 Chapter 11: Linear Regression and Correlation Chapter 12: Multiple Regression.
Principles of Biostatistics Chapter 17 Correlation 宇传华 网上免费统计资源(八)
1 Experimental Statistics - week 11 Chapter 11: Linear Regression and Correlation.
1 Experimental Statistics - week 5 Chapter 9: Multiple Comparisons Chapter 15: Randomized Complete Block Design (15.3)
Chapter 13 Simple Linear Regression
Chapter 20 Linear and Multiple Regression
Experimental Statistics - Week 4 (Lab)
Experimental Statistics - week 8
Correlation and Simple Linear Regression
Presentation transcript:

Experimental Statistics - week 9 Chapter 18: Repeated Measures

Repeated Measures with a Single Factor Time Subject Reading for ith time period jth subject

Single Factor Repeated Measures Designs single factor repeated measures model is similar to the randomized complete block model - i.e. 2 factors (subject and time) with one observation cell - since there is only one observation per cell, we cannot estimate an interaction term typically: - subject is a random effect - time is a fixed effect time subject

Repeated Measure Design with Single Factor ANOVA Table for Repeated Measure Design with Single Factor Source SS df MS EMS F   Between subjects SSP n - 1 MSP MSP/MSE   Time SSA a - 1 MSA MSA/MSE Error SSE (n - 1)(a- 1) MSE Total TSS an - 1

Data – 5 subjects take tablet -- blood samples taken .5, 1, 2, 3, and 4 hours after ingestion Goal: understand rate at which medicine enters blood Time Subject .5 1 2 3 4 1 50 75 120 60 30 2 40 80 135 70 40 3 55 75 125 85 50 4 70 85 140 90 40 5 60 90 150 95 50

Dependent Variable: conc Sum of Source DF Squares Mean Square F Value Pr > F Model 8 26442.00000 3305.25000 66.60 <.0001 Error 16 794.00000 49.62500 Corrected Total 24 27236.00000 R-Square Coeff Var Root MSE conc Mean 0.970847 8.985333 7.044501 78.40000 Source DF Type III SS Mean Square F Value Pr > F subject 4 1576.00000 394.00000 7.94 0.0010 time 4 24866.00000 6216.50000 125.27 <.000

The GLM Procedure t Tests (LSD) for conc NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 16 Error Mean Square 49.625 Critical Value of t 2.11991 Least Significant Difference 9.4449 Means with the same letter are not significantly different. t Group Mean N time A 134.000 5 2 B 81.000 5 1 B B 80.000 5 3 C 55.000 5 0.5 D 42.000 5 4

Results:

Residual Diagnostics – 1-factor Repeated Measures Data

Note: An additional assumption (related to the equal variance assumption) is that of sphericity -- the assumption that pairwise differences between times all have the same population variances -- compound symmetry is a related (more stringent) requirement -- discussed briefly in text -- beyond scope of this course

Two-Factor Repeated Measure Data (p.1033) Data – 10 subjects (5 take tablet, 5 take capsule) -- blood samples .5, 1, 2, 3, and 4 hours after ingestion Goal: compare blood concentration patterns of the two methods of administration Tablet Capsule Time Subject .5 1 2 3 4 1 50 75 120 60 30 2 40 80 135 70 40 3 55 75 125 85 50 4 70 85 140 90 40 5 60 90 150 95 50 Time Subject .5 1 2 3 4 1 30 55 80 130 65 2 25 50 75 125 60 3 35 65 85 140 85 4 45 70 90 145 80 5 50 75 95 160 90

2-Factor with Repeated Measure -- Model type subject within type type by time interaction time NOTES: type and time are both fixed effects in the current example - we say “subject is nested within type” - Expected Mean Squares given on page 1032

PROC GLM; CLASS type subject time; MODEL conc=type subject(type) time type*time; TITLE 'Repeated Measures – 2 factors'; OUTPUT out=new r=resid; MEANS type time/LSD; RANDOM subject(type)/test;

2-Factor Repeated Measures – ANOVA Output The GLM Procedure Dependent Variable: conc Sum of Source DF Squares Mean Square F Value Pr > F Model 17 57720.50000 3395.32353 110.87 <.0001 Error 32 980.00000 30.62500 Corrected Total 49 58700.50000 R-Square Coeff Var Root MSE conc Mean 0.983305 6.978545 5.533986 79.30000 Source DF Type III SS Mean Square F Value Pr > F type 1 40.50000 40.50000 1.32 0.2587 subject(type) 8 3920.00000 490.00000 16.00 <.0001 time 4 34288.00000 8572.00000 279.90 <.0001 type*time 4 19472.00000 4868.00000 158.96 <.0001

2-factor Repeated Measures Source Type III Expected Mean Square type Var(Error) + 5 Var(subject(type)) + Q(type,type*time) subject(type) Var(Error) + 5 Var(subject(type)) time Var(Error) + Q(time,type*time) type*time Var(Error) + Q(type*time) The GLM Procedure Tests of Hypotheses for Mixed Model Analysis of Variance Dependent Variable: conc Source DF Type III SS Mean Square F Value Pr > F * type 1 40.500000 40.500000 0.08 0.7810 Error 8 3920.000000 490.000000 Error: MS(subject(type)) * This test assumes one or more other fixed effects are zero. Source DF Type III SS Mean Square F Value Pr > F subject(type) 8 3920.000000 490.000000 16.00 <.0001 * time 4 34288 8572.000000 279.90 <.0001 type*time 4 19472 4868.000000 158.96 <.0001 Error: MS(Error) 32 980.000000 30.625000

NOTE: Since time x type interaction is significant, and since these are fixed effects we DO NOT test main effects – we compare cell means (using MSE) Cell Means .5 1 2 3 4 C 37 63 85 140 76 T 55 81 134 80 42

Note on Multiple Comparisons: If there had NOT been a significant interaction, then the LSD to compare cell means: (a) for time – use MSE (SAS will give these results) (b) for type – use MS(subject(type)) (SAS will NOT give these results)

SAS LSD Output for Comparing Times Alpha 0.05 Error Degrees of Freedom 32 Error Mean Square 30.625 Critical Value of t 2.03693 Least Significant Difference 5.0412 Means with the same letter are not significantly different. t Grouping Mean N time A 110.000 10 3 A A 109.500 10 2 B 72.000 10 1 C 59.000 10 4 D 46.000 10 .5

Diagnostic Plots for 2-Factor Repeated Measures Data

Write-up related to the SAS output.

Note, that even though we get a significant variance component due to subject(within group) I did not estimate the variance component itself. (I did not give this particular variance component estimation formula.)

Dealing with Normality/Equal Variance Issues Normalizing Transformations: - log - square root - Box-Cox transformations Note: the normalizing transformations sometimes also produce variance stabilization

Nonparametric “ANOVA” Man-Whitney U – for comparing 2 independent samples Kruskal-Wallis Test – for comparing >2 independent samples Friedman’s Test – nonparametric alternative to randomized complete block/ 1-factor repeated measures design

Section 2 Regression Analysis

Scatter Diagram (Scatterplot) Histogram displays distribution of 1 variable Scatter Diagram (Scatterplot) displays joint distribution of 2 variables plots data as “points” in the “x-y plane.”

Association Between Two Variables indicates that knowing one helps in predicting the other Linear Association our interest in this course points “swarm” about a line Correlation Analysis measures the strength of linear association

Hypothetical Father-Son Data Son’s Height in Inches Father’s Height in Inches

(association)

Regression Analysis Dependent Variable (Y) Independent Variable (X) We want to predict the dependent variable - response variable using the independent variable - explanatory variable - predictor variable Dependent Variable (Y) Independent Variable (X) More than one independent variable – Multiple Regression

11.7 Correlation Analysis

Correlation Coefficient - measures linear association -1 0 +1 perfect no perfect negative linear positive relationship relationship relationship Denoted r or ryx

Positive Correlation - - high values of one variable are associated with high values of the other 3 2 1 Examples: - father’s height, son’s height - daily grade, final grade r = 0.93 for plot on the left 1 2 3 4 5 6 7 8

EXAMS I and II

Negative Correlation - - high with low, low with high Examples: - car age, selling price - days absent, final grade r = - 0.89 for plot shown here 4 3 2 1 1 2 3 4 5 6 7

Zero Correlation - - no linear relationship 5 4 3 2 1 Examples: - height, IQ score r = 0.0 for plot here 1 2 3 4 5 6 7

-.75, 0, .5, .99

Calculating the Correlation Coefficient

Notation: So --

Find r The data below are the study times and the test scores on an exam given over the material covered during the two weeks. Study Time Exam (hours) Score (X) (Y) 10 92 15 81 12 84 20 74 8 85 16 80 14 84 22 80 Find r

DATA one; INPUT time score; DATALINES; 10 92 15 81 12 84 20 74 8 85 16 80 14 84 22 80 ; PROC CORR; Var score time; TITLE ‘Study Time by Score'; RUN; PROC PLOT; PLOT time*score; PROC GPLOT;

The CORR Procedure 2 Variables: score time Simple Statistics Variable N Mean Std Dev Sum Minimum Maximum score 8 82.50000 5.18239 660.00000 74.00000 92.00000 time 8 14.62500 4.74906 117.00000 8.00000 22.00000 Pearson Correlation Coefficients, N = 8 Prob > |r| under H0: Rho=0 score time score 1.00000 -0.77490 0.0239 time -0.77490 1.00000 Study Time by Score

PROC PLOT Plot of score*time. Legend: A = 1 obs, B = 2 obs, etc. ‚ 92 ˆ A 91 ˆ 90 ˆ 89 ˆ 88 ˆ 87 ˆ 86 ˆ 85 ˆ A 84 ˆ A A 83 ˆ 82 ˆ 81 ˆ A 80 ˆ A A 79 ˆ 78 ˆ 77 ˆ 76 ˆ 75 ˆ 74 ˆ A Šƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒƒƒƒˆƒƒ 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 time

PROC GPLOT