Sleep data, two drugs Ch13.xls

Similar documents
SRBx14_9.xls Ch14.xls

Data files & analysis PrsnLee.out Ch9.xls

Model Based Statistics in Biology. Part V. The Generalized Linear Model. Chapter 18.1 Logistic Regression (Dose - Response)

Data files and analysis Lungfish.xls Ch9.xls

Wrap-up. The General Linear Model is a special case of the Generalized Linear Model. Consequently, we can carry out any GLM as a GzLM.

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

Six Sigma Black Belt Study Guides

GLMM workshop 7 July 2016 Instructors: David Schneider, with Louis Charron, Devin Flawd, Kyle Millar, Anne St. Pierre Provencher, Sam Trueman

One-Way ANOVA. Some examples of when ANOVA would be appropriate include:

Sociology 6Z03 Review II

Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami

Chap The McGraw-Hill Companies, Inc. All rights reserved.

Model Based Statistics in Biology. Part V. The Generalized Linear Model. Chapter 16 Introduction

Review for Final. Chapter 1 Type of studies: anecdotal, observational, experimental Random sampling

ST4241 Design and Analysis of Clinical Trials Lecture 4: 2 2 factorial experiments, a special cases of parallel groups study

Model Based Statistics in Biology. Part III. The General Linear Model. Chapter 8 Statistical Inference with the General Linear Model

An Old Research Question

Stat 6640 Solution to Midterm #2

Review of Statistics 101

What is Experimental Design?

Multiple comparisons - subsequent inferences for two-way ANOVA

Lecture 7: Hypothesis Testing and ANOVA

Exam details. Final Review Session. Things to Review

Factorial designs. Experiments

Regression With a Categorical Independent Variable: Mean Comparisons

Design of Engineering Experiments Part 2 Basic Statistical Concepts Simple comparative experiments

Inferences for Regression

OHSU OGI Class ECE-580-DOE :Design of Experiments Steve Brainerd

Stat 705: Completely randomized and complete block designs

Experimental Design and Data Analysis for Biologists

INTRODUCTION TO DESIGN AND ANALYSIS OF EXPERIMENTS

ANOVA CIVL 7012/8012

A discussion on multiple regression models

Analysis of Variance and Co-variance. By Manza Ramesh

INTRODUCTION TO ANALYSIS OF VARIANCE

Mathematical Notation Math Introduction to Applied Statistics

20.0 Experimental Design

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

Unit 12: Analysis of Single Factor Experiments

Deciphering Math Notation. Billy Skorupski Associate Professor, School of Education

PLSC PRACTICE TEST ONE

Two-Sample Inferential Statistics

Chapter 4: Randomized Blocks and Latin Squares

Unit 8: A Mixed Two-Factor Design

Inference for Regression Inference about the Regression Model and Using the Regression Line, with Details. Section 10.1, 2, 3

What is a Hypothesis?

Variance Estimates and the F Ratio. ERSH 8310 Lecture 3 September 2, 2009

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

psyc3010 lecture 2 factorial between-ps ANOVA I: omnibus tests

What If There Are More Than. Two Factor Levels?

Statistics For Economics & Business

Comparing Nested Models

Tests about a population mean

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs)

TA: Sheng Zhgang (Th 1:20) / 342 (W 1:20) / 343 (W 2:25) / 344 (W 12:05) Haoyang Fan (W 1:20) / 346 (Th 12:05) FINAL EXAM

Lecture 9: Linear Regression

Bivariate Relationships Between Variables

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

Analysis of Variance: Part 1


2. TRUE or FALSE: Converting the units of one measured variable alters the correlation of between it and a second variable.

Group comparison test for independent samples

School of Mathematical Sciences. Question 1

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya

Question. Hypothesis testing. Example. Answer: hypothesis. Test: true or not? Question. Average is not the mean! μ average. Random deviation or not?

Chapter 1 Statistical Inference

STAT 115:Experimental Designs

:the actual population proportion are equal to the hypothesized sample proportions 2. H a

Analysis of Variance

Using SPSS for One Way Analysis of Variance

Inference for Regression Simple Linear Regression

REVIEW 8/2/2017 陈芳华东师大英语系

Today: Cumulative distributions to compute confidence limits on estimates

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

Statistics: revision

Sampling Distributions: Central Limit Theorem

Chapter Seven: Multi-Sample Methods 1/52

Section 9.4. Notation. Requirements. Definition. Inferences About Two Means (Matched Pairs) Examples

An Analysis of College Algebra Exam Scores December 14, James D Jones Math Section 01

RCB - Example. STA305 week 10 1

Formal Statement of Simple Linear Regression Model

Inference for the Regression Coefficient

Factorial Analysis of Variance

1 Introduction to One-way ANOVA

Stats fest Analysis of variance. Single factor ANOVA. Aims. Single factor ANOVA. Data

Analysis of Covariance. The following example illustrates a case where the covariate is affected by the treatments.

STAT 525 Fall Final exam. Tuesday December 14, 2010

Econometrics. 4) Statistical inference

Unit 27 One-Way Analysis of Variance

WELCOME! Lecture 13 Thommy Perlinger

Reference: Chapter 13 of Montgomery (8e)

The entire data set consists of n = 32 widgets, 8 of which were made from each of q = 4 different materials.

Analysis of Variance. Read Chapter 14 and Sections to review one-way ANOVA.

DESAIN EKSPERIMEN BLOCKING FACTORS. Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya

Correlation Analysis

HYPOTHESIS TESTING II TESTS ON MEANS. Sorana D. Bolboacă

Ch 2: Simple Linear Regression

Objectives Simple linear regression. Statistical model for linear regression. Estimating the regression parameters

16.400/453J Human Factors Engineering. Design of Experiments II

Preface Introduction to Statistics and Data Analysis Overview: Statistical Inference, Samples, Populations, and Experimental Design The Role of

Transcription:

Model Based Statistics in Biology. Part IV. The General Linear Mixed Model.. Chapter 13.3 Fixed*Random Effects (Paired t-test) ReCap. Part I (Chapters 1,2,3,4), Part II (Ch 5, 6, 7) ReCap Part III (Ch 9, 10, 11) ReCap Multiple Regression (Ch 12) 13.1 Fixed Effects ANOVA (no interactive effects) 13.2 Fixed Effects ANOVA (interactive effects) 13.3 Fixed*Random Effects (Paired t-test) 13.4 Fixed*Random Effects (Randomized Block) 13.5 Fixed*Random Effects (Repeated Measures) 13.6 Nested Random Effects (Hierarchical ANOVA) 13.7 Random within Fixed (Hierarchical ANOVA) 13.8 More Than Two Factors (to be written) Sleep data, two drugs Ch13.xls ReCap Part I (Chapters 1,2,3,4) Quantitative reasoning is based on models, including statistical analysis based on models. ReCap Part II (Chapters 5,6,7) Estimation is concerned with the specific value of an unknown population parameter. Confidence limits use a fixed error rate to span an interval that contains the parameter. Hypothesis testing uses the logic of the null hypothesis to declare a decision about a parameter ReCap (Ch 9, 10,11) The General Linear Model - Single explanatory variable. ReCap (Ch 12) GLM with more than one regression variable - Multiple regression) ReCap (Ch 13) GLM with more than one categorical variable Today: Paired t-test. One response variable Y as a function of two explanatory variables X 1 X 2. Both explanatory variables are categorical, on a nominal scale. One categorical variable is fixed, the other is random. This is called a mixed model Wrap-up. The paired t-test is a General Linear Model with two categorical variables, i.e. two explanatory variables on a nominal scale. One of these is fixed (2 classes only), the other is random (many classes). We are interested in the fixed effects, controlled for the random effects. Adding the random factor to the model reduces the error variance, resulting in a more sensitive test. This is called statistical control. 1

Introduction. A very common experimental design is to measure all levels of a fixed variable within each of several units that vary randomly. For example, we measure the effects of first one drug, then another, on each of 10 patients. The advantage of this design is that variation among units can be removed from the analysis, allowing a more sensitive test of the factor of interest. This design is called a Randomized Complete Block (RCB) design. If the fixed variable has only two classes, this design is called a paired t-test. To illustrate this analysis, we return to the sleep data (Cushny and Peebles 1905), which Gossett used to introduce the t-test. 1. Construct model Data are: hours of extra sleep with two drugs Hyoscyamine (Drug A) and L Hyoscine (Drug B), each administered to 10 subjects. Values reported are averages. The pairing across subject allows us to remove the effects of individual variation. Response variable. T = hours of extra sleep Explanatory variables are drug and subject. Drug X D = [Drug A, Drug B] Drug is a nominal scale variable with two categories. It is a fixed effect. Subject X S = subject [1,2,3,etc.]. Ten categories, nominal scale. This is a random effect, because the mean value for each subject varies randomly. The levels are not chosen by the investigator. Verbal model. Hours of extra sleep depends on drug. Graphical model. Connect mean value at two levels for each subject. Graph shows increase from Drug A to Drug B in all subjects. There appears to be little or no interactive effect, because the lines rise from left to right, in a more or less parallel fashion. 2

1. Construct formal model To begin, we write the formal model with the interaction term. Write GLM: T = β o + β D X D + β S X S + β D x S X D X S + residual Mixed model: T ijk = μ + α i + S j + (α S) ij + ϵ ijk A model has been written using two forms of notation. The first is typical notation for the GLM, the second typical in experimental design. Both have the same structure -- three explanatory terms, one for drug (a fixed effect), one for subject (a random effect), and one for interactive effects--the dependence of drug effect on subject. The first notation does not explicitly separate random and fixed factors. It omits subscripts. The second assigns a greek letter (α) to the fixed factor and a roman letter (S) to the random factor. This notation shows subscripts -- i = 2 levels of drug (A and B), j = 10 subjects, k = number of measurements per subject. In this example we have one measurement per subject at each level of treatment. We have ijk = 2*10*1 = 20 observations. In this analysis we do not have enough data to estimate the interactive effect. We have 20 measurements, which allows us to estimate a mean difference between drugs, a mean for each subject, leaving 20 1 1 9 = 9 degrees of freedom for the error term. If we estimate the interaction term there will be no degrees of freedom for the error term. We revise the model by omitting the interaction term. GLM: T = β o + β D X D + β S X S + ϵ Mixed model T ij = μ + α i + S j + ϵ ij The result is a new residual term (ϵ ij = (α S) ij + ϵ) that includes the interaction term. 2. Execute analysis. Place data in model format: Column labelled T, with response variable hours of extra sleep Column labelled X D with explanatory variable, X D = 0 or 1 Column labelled X S with explanatory variable, X S = 0, 1...10 These are labels (categories), not numbers on ratio scale. Use the model to execute the analysis in a statistical package. T = β o + β S X S + β D X D + ϵ 3

2. Execute analysis. Here are the calculations in spreadsheet format. The grand mean. β 0 = 20 1 ΣT = 20 1 30.8 = 1.54 hours The fitted values are computed from the row and column means. mean(t D=A ) = 0.75 hours β D=A = (0.75 1.54) = 0.79 hours mean(t D=B ) = 2.33 hours β D=B = (2.33 1.54) = +0.79 hours mean(t S=1 ) = 1.30 hours β S=1 = (1.30 1.54) = 0.24 hours mean(t S=2 ) = 0.40 hours β S=2 = ( 0.40 1.54) = 1.94 hours etc. 3. Evaluate the model. Plot residuals versus fits. 1. No regression line, so skip this evaluation. 2. If n small, evaluate assumptions for computing p- values. n = 48 so only large violations will distort p-values or confidence limits. a. Homogeneous? Yes, because the vertical dispersion is similar from low to high fitted values. Residuals 2 1 0-1 -2 0 1 2 3 4 5 6 Fits 4

3. Evaluate the error model. 2b. Independent? Graph suggests some pattern of negative correlation. There are two mirror image patterns of 4 dots each in the graph. Looking at the residuals, we see that for every value 2 within Drug A, there is a value of the same magnitude 1 and opposite sign within Drug B. If we plot only the residuals from Drug A, the pattern disappears. We see that for factorial designs, we can expect patterns to appear when there are only two values per category. 2c. Normal? The residuals are normal, the closely follow the trend line in the normal probability plot. 4. State population and whether sample is representative. 0.00 When we draw conclusions from this sample, what is the population to which we are inferring? The drugs were set by experimental design. Drug is a fixed factor so are inferring only to these two drugs. The subjects are a random effect because the were not chosen according to any individual characteristic, such as weight, for example. They were not chosen at random from a larger population and hence may not be representative of a larger population of people. We would require a well executed clinical trial with randomly chosen subjects before making strong claims about the efficacy of one drug relative to another. We can infer to a population of all possible measurements of hours of extra sleep, given the mode of collection. We will be considering a hypothetical population of all possible measurements. residuals residuals Probability 0-1 -2 2 1 0-1 -2 1.00 0.75 0.50 0.25-2 0 2 lagged residuals -2-1 0 1 2 lagged residuals 0 5 10 15 20 Residuals in rank order 5

5. Decide on mode of inference. Is hypothesis testing appropriate? Research question is binary: do drugs differ in effect, controlling for individual variation in response to the drugs? So hypothesis testing is appropriate (step 6). 6. State H A H o pairs, test statistic, distribution, tolerance for Type I error. Hypothesis testing will focus on the drug effect. We are not interested in the mean values for any of the subjects. The presence of the subject factor in the model reduces the error term and results in a more sensitive test, one able to pick up smaller differences than a model lacking the subject factor. Hypotheses for the drug term. H A : Mean(T D=A ) Mean(T D=B ) The population means differ H 0 : Mean(T D=A ) = Mean(T D=B ) The population means do not differ These hypotheses are equivalent to H A : β D 0 H o : β D = 0 Are there more specific hypotheses about parameters? No State test statistic F-ratio Distribution of test statistic F-distribution Tolerance for Type I error 5% (conventional level) 7. ANOVA - Calculate df then partition variance according to model. GLM T β o = β S X S + β D X D + ϵ Source Total = Subject + Drug + Resid df 20 1 = 10 1 + 2 1 + 19 9 1 SS 77.37 = 58.08 + 12.48 + 6.81 Here are the SS calculations in a spreadsheet, based on data equations. Note that t 2 = 4.06 2 = 16.5 6

Here are ANOVA table calculations in spreadsheet form. We see that F = t 2 (shown above) If we omit the Subject term from the model, the SS and df for that term are added to the residual. We have MS residual = (58.078+6.808)/(9+9) = 3.604 This substantially increases the MS residual and so substantially reduces the power to detect the drug effect. The F-ratio decreases to F = 12.482 / 3.604 = 3.46 p = 0.079 The test statistic is no longer significant at α = 5% 8. Recompute p-value? Not necessary. 9. Declare decision about terms. Random factors are not test, fixed factors are tested. For the drug effect we report the F-ratio and p-value. F 1,9 = 16.5 p = 0.0028 < α = 5% We reject H o and accept H A: Subjects slept longer with Drug B than with Drug A. 7

10. Report and interpret parameters of biological interest. No means are reported or compared for the subject term because it is a random factor and so the means are of no interest. The confidence limits for each group overlap because the among subject variance is not controlled statistically. st.err Lower CL Upper CL mean(t A ) = 0.75 hours 0.5657 0.53 hours 2.03 hours mean(t B ) = 2.33 hours 0.6332 +0.80 hours 3.06 hours Here are the confidence limits for the average difference, controlled for among subject variation. Note that the standard error of the difference is smaller than the standard errors of each group. This is because the among subject variance has been removed. st.err Lower CL Upper CL mean(t B T A ) = 1.58 hours 0.3890 0.70 hours 2.46 hours The confidence limits do not include zero; there is a significant difference between the drugs. 8