Regression models. Categorical covariate, Quantitative outcome. Examples of categorical covariates. Group characteristics. Faculty of Health Sciences

Similar documents
Faculty of Health Sciences. Regression models. Counts, Poisson regression, Lene Theil Skovgaard. Dept. of Biostatistics

Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA

Review of Statistics 101

Multiple comparisons - subsequent inferences for two-way ANOVA

ANOVA Situation The F Statistic Multiple Comparisons. 1-Way ANOVA MATH 143. Department of Mathematics and Statistics Calvin College

More about Single Factor Experiments

Statistics for exp. medical researchers Regression and Correlation

Comparing Several Means: ANOVA

Lecture 5: ANOVA and Correlation

1-Way ANOVA MATH 143. Spring Department of Mathematics and Statistics Calvin College

Statistical methods for comparing multiple groups. Lecture 7: ANOVA. ANOVA: Definition. ANOVA: Concepts

The One-Way Independent-Samples ANOVA. (For Between-Subjects Designs)

Multiple Comparison Procedures Cohen Chapter 13. For EDUC/PSY 6600

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

Ph.D. course: Regression models. Regression models. Explanatory variables. Example 1.1: Body mass index and vitamin D status

Confidence Intervals, Testing and ANOVA Summary

Chapter Seven: Multi-Sample Methods 1/52

Week 14 Comparing k(> 2) Populations

22s:152 Applied Linear Regression. Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA)

DETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics

4.1 Example: Exercise and Glucose

Lecture 26: Chapter 10, Section 2 Inference for Quantitative Variable Confidence Interval with t

DESIGNING EXPERIMENTS AND ANALYZING DATA A Model Comparison Perspective

Chapter 1 Statistical Inference

1 One-way Analysis of Variance

Formal Statement of Simple Linear Regression Model

Analysis of variance. April 16, Contents Comparison of several groups

Analysis of variance. April 16, 2009

22s:152 Applied Linear Regression. 1-way ANOVA visual:

9 One-Way Analysis of Variance

Lec 1: An Introduction to ANOVA

22s:152 Applied Linear Regression. Take random samples from each of m populations.


Mathematical Notation Math Introduction to Applied Statistics

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking

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

22s:152 Applied Linear Regression. There are a couple commonly used models for a one-way ANOVA with m groups. Chapter 8: ANOVA

Comparing the means of more than two groups

Extending the Robust Means Modeling Framework. Alyssa Counsell, Phil Chalmers, Matt Sigal, Rob Cribbie

COMPARING SEVERAL MEANS: ANOVA

Tentative solutions TMA4255 Applied Statistics 16 May, 2015

Lecture 9: Linear Regression

Sociology 6Z03 Review II

Analysis of Variance and Contrasts

Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs

Ph.D. course: Regression models

Ph.D. course: Regression models. Introduction. 19 April 2012

Introduction to the Analysis of Variance (ANOVA)

Correlation and Regression

Analysis of Variance

Sampling distribution of t. 2. Sampling distribution of t. 3. Example: Gas mileage investigation. II. Inferential Statistics (8) t =

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis.

Specific Differences. Lukas Meier, Seminar für Statistik

Tentamentsskrivning: Statistisk slutledning 1. Tentamentsskrivning i Statistisk slutledning MVE155/MSG200, 7.5 hp.

Lecture 7: Hypothesis Testing and ANOVA

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

Multiple Pairwise Comparison Procedures in One-Way ANOVA with Fixed Effects Model

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES

Correlation and regression

We like to capture and represent the relationship between a set of possible causes and their response, by using a statistical predictive model.

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

Categorical Predictor Variables

Dr. Junchao Xia Center of Biophysics and Computational Biology. Fall /8/2016 1/38

Lecture 18: Simple Linear Regression

I i=1 1 I(J 1) j=1 (Y ij Ȳi ) 2. j=1 (Y j Ȳ )2 ] = 2n( is the two-sample t-test statistic.

Statistics for EES Factorial analysis of variance

Analysis of variance (ANOVA) ANOVA. Null hypothesis for simple ANOVA. H 0 : Variance among groups = 0

Rejection regions for the bivariate case

Section IX. Introduction to Logistic Regression for binary outcomes. Poisson regression

Analysing data: regression and correlation S6 and S7

Regression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont.

One-Way ANOVA Cohen Chapter 12 EDUC/PSY 6600

Lecture 6 Multiple Linear Regression, cont.

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

Single and multiple linear regression analysis

Analysis of variance (ANOVA) Comparing the means of more than two groups

2. RELATIONSHIP BETWEEN A QUALITATIVE AND A QUANTITATIVE VARIABLE

36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression

(Where does Ch. 7 on comparing 2 means or 2 proportions fit into this?)

Group comparison test for independent samples

Model Estimation Example

Section 4.6 Simple Linear Regression

Correlation and simple linear regression S5

y ˆ i = ˆ " T u i ( i th fitted value or i th fit)

Chapter 11. Correlation and Regression

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013

9 Correlation and Regression

ANOVA: Analysis of Variation

Analysis of Variance II Bios 662

Outline. Analysis of Variance. Acknowledgements. Comparison of 2 or more groups. Comparison of serveral groups

You can compute the maximum likelihood estimate for the correlation

Formula for the t-test

Chapter 12. Analysis of variance

Lecture 5: Comparing Treatment Means Montgomery: Section 3-5

Inferences for Regression

One-way between-subjects ANOVA. Comparing three or more independent means

This gives us an upper and lower bound that capture our population mean.

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

Correlation and Simple Linear Regression

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

Transcription:

Faculty of Health Sciences Categorical covariate, Quantitative outcome Regression models Categorical covariate, Quantitative outcome Lene Theil Skovgaard April 29, 2013 PKA & LTS, Sect. 3.2, 3.2.1 ANOVA k + 1 groups, j = 0, 1,..., k Omnibus test of identity Multiple comparisons One-way Analysis of Variance Model check Transformation Home pages: http://biostat.ku.dk/~pka/regrmodels13 E-mail: ltsk@sund.ku.dk 1 / 43 2 / 43 Examples of categorical covariates Group characteristics Treatment typically randomized studies, controllable Smoking habits not controllable differences may be due to... Body stature categorized quantitative variable, e.g. normal weight (18.5 < BMI < 25) slight overweight (25 BMI < 30) obese (BMI 30) Characteristic c j of the distribution in the jth group, e.g. mean value log(odds) of some event log(hazard rate) yet to be presented Linear predictor for the outcome y i : LP i = c 0, if subject i belongs to group 0 c 1, if subject i belongs to group 1...... c k, if subject i belongs to group k 3 / 43 4 / 43

Dummy variables The linear predictor k + 1 different groups, j = 0, 1,..., k Specify k + 1 dummy variables, as indicator variables for each group seperately: Using the dummy indicators, we write the linear predictor as a linear function: LP i = c 0 I (x i = 0) + c 1 I (x i = 1) + + c k I (x i = k) 1 if subject i belongs to group j I (x i = j) = 0 otherwise j = 0, 1,, k. or, using group 0 as a reference group LP i = c 0 + (c 1 c 0 )I (x i = 1) + + (c k c 0 )I (x i = k) 5 / 43 6 / 43 Traditional parametrization Omnibus test of equality of groups Define the new parameters as a = c 0, level in reference group b j = c j c 0, j = 1,..., k, discrepancy between group j and reference group Traditional research question: Do the groups differ? Then the linear predictor may be written: LP i = a + b 1 I (x i = 1) + + b k I (x i = k), or H 0 : c 0 = c 1 = = c k (= a) H 0 : b 1 = b 2 = = b k = 0 actually as a multiple regression model 7 / 43 8 / 43

The Likelihood function Likelihood ratio test The probability (or probability density) of observing these particular data, as a function of the unknown parameters The Likelihood principle for estimation: Maximize this function, i.e. Find the values of the unknown parameters that maximize the probability of observing precisely what we actually did observe. We believe the parameters to have values that make the observed data the most plausible. Compare initial model with model under H 0 When Q is small, we reject H 0 Q = max. Likelihood under H 0 max. Likelihood under model. Often, we use 2 log Q as a test statistic, because 2 log Q χ 2 (k) 9 / 43 10 / 43 Illustration of test statistics Comparisons between groups Automatically, we get comparisons between the reference group and all others, i.e. k comparisons (b j -parameters) If the omnibus test of equality is rejected, we may want to perform all pairwise comparisons between the k + 1 groups, i.e. a total of K = k(k + 1)/2 comparisons. Q Likelihood ratio test W Walds test S Score test This may well create problems in connection to type I error (will increase dramatically) Confidence intervals (with be too narrow) 11 / 43 12 / 43

Mass significance Type I error in multiple comparisons Suppose all groups are truely identical Every pairwise comparison has a type I error rate of α (0.05), i.e. a probability of 1 α for a correct decision K such independent comparisons yield a probability of (1 α) K for getting them all correct i.e. a probability of 1 (1 α) K for getting at least one false significance, i.e. the type I error rate for the total procedure x All comparisons o Comparisons to reference group only 13 / 43 14 / 43 Correction for inflated type I error Adjusted P-values K group comparisons, K group comparisons, Increase the P-value to P K, e.g. Control the experimentwise error rate by lowering the level of significance to α K, e.g. Bonferroni : α K α K Sidak : α K = 1 (1 α) 1/K Others : may exist in specific contexts Bonferroni : Multiply by K, i.e., P K = K P may become greater than 1! Sidak : P K = 1 (1 P) K never larger than 1 Others : may exist in specific contexts Consequence: A reduction in power (increase of type II error rate) Differences become harder to detect 15 / 43 16 / 43

Confidence limits But If each single confidence interval is constructed to have an (approximate) coverage of 95%, then the simultaneous coverage rate (for all parameters) will be less than 95%, and it will be appreciably less if many intervals are involved. Adjustment: Use alternative quantiles for the construction, e.g. the (1 α K /2) quantile, where α K is the adjusted significance level (according to some rule). Pairwise tests are not independent! If two groups look alike, they both resemble a third group equally much. Therefore, Bonferroni and Sidak are conservative Significance level α K is unneccessary low We get unneccessarily low power, i.e. Differences are too hard to detect 17 / 43 18 / 43 Recommendation Quantitative outcome Design your investigation to be as simple as possible Avoid considering too many groups simultaneously, focus Write a protocol, describing your opinion, beliefs and intentions Nature of Dichotomous/Binary General categorical outcome Two levels Three or more levels Quantitative T-tests Anova Binary 2*2 tables (k+1)*2 tables Survival time log-rank test (k+1)-sample log-rank test 19 / 43 20 / 43

Example: Fatty acids absorption Scatter plot Lymphatic absorption of fatty acids was studied (Fruekilde and Høy, 2004), by feeding 40 rats with different dairy products. The rats were subdivided into five diet groups: 1. cream cheese 2. sour cream 3. cream 4. mixed butter 5. butter Do we see an effect of diet on total accumulation of fatty acids? The absorption for products 4 and 5 seem to be at a lower level than the other three diets 21 / 43 22 / 43 Summary statistics The covariate: Dairy product Product j n j Average ( m j ) SD (ŝ j ) Cream cheese 0 8 153.02 41.905 Sour cream 1 6 210.40 28.212 Cream 2 12 193.04 36.275 Mixed butter 3 6 106.38 17.200 Butter 4 8 111.13 12.034 Let x i denote the dairy product for the ith rat, defined as x i = 0, if rat i was fed with cream cheese, I 1, if rat i was fed with sour cream, II 2, if rat i was fed with cream, III 3, if rat i was fed with mixed butter, IV 4, if rat i was fed with butter, V 23 / 43 24 / 43

Model Technicalities Let y i denote the outcome (fatty acid absorption) for the ith rat We assume all the y i s to be independent, with mean values given by E(y i ) = m 0 m 1 m 2 m 3 m 4 and identical standard deviations. if x i = 0 (cream cheese) if x i = 1 (sour cream) if x i = 2 (cream) if x i = 3 (mixed butter) if x i = 4 (butter) Estimate of common standard deviation The pooled estimate of standard deviation is given by 4j=0 ŝ = (n j 1)ŝj 2 4j=0 (n j 1) = 30.817, where the denominator 4 j=0 (n j 1) = n 5 = 35 denotes the degrees of freedom in the estimation of the common standard deviation, and n denotes the total number of observations. 25 / 43 26 / 43 Traditional model formulation Hypothesis testing Linear predictor: with the parameters E(y i ) = a + b 1 I (x i = 1) + + b k I (x i = k). a = m 0, b j = m j m 0, j = 1,..., k, and with dummy variables I (x i = j) defined as indicator variables for each group (here, k = 4). Traditional research question: Do the distributions differ among the groups? More specifically, in this situation: Are the mean values equal? or Likelihood ratio test H 0 : m 0 = m 1 = = m k (= a) H 0 : b 1 = b 2 = = b k = 0. 2 log Q χ 2 (k) 27 / 43 28 / 43

Technicalities Test results for fatty acids Specifically for Normally distributed outcome, the likelihood ratio test statistic is often transformed to an F-test statistics ( ) n k 1 1 Q 2/n F = = MS B F(k, n k 1), k MS W Q 2/n The F-test is a ratio of two variances, hence the name Analysis of Variance One-way because we have only one categorical covariate Analysis of variance table Variation SS df MS Total 39 Within group 33239.12 35 949.69 Between groups 64960.46 4 16240.12 2 log Q = 43.33 χ 2 (4), P <0.0001 F = 17.10 F(4, 35), P < 0.0001 29 / 43 30 / 43 Estimation Confidence intervals Maximum likelihood method yields: â = ȳ 0 b j = ȳ j ȳ 0 the most interesting parameters E( b j ) = E(ȳ j ȳ 0 ) = m j m 0 = b j 1 SD( b j ) = SD(ȳ j ȳ 0 ) = ŝ + 1. n 0 n j For large samples, b j = ȳ j ȳ 0 will have an approximate Normal distribution. An approximate 95% confidence interval for b j is therefore b j ± 1.96 SD( b j ) = ȳ j ȳ 0 ± 1.96 SD(ȳ j ȳ 0 ), 31 / 43 32 / 43

Estimates for fatty acids Using t-quantile Product Parameter Estimate SD 95% CI Cream cheese a = m 0 153.02 10.90 (130.91, 175.14) Sour cream b 1 = m 1 m 0 57.37 16.64 (23.58, 91.16) Cream b 2 = m 2 m 0 40.01 14.07 (11.46, 68.57) Mixed butter b 3 = m 3 m 0-46.64 16.64 (-80.43, -12.86) Butter b 4 = m 4 m 0-41.90 15.41 (-73.18, -10.61) For small to moderate samples, we use instead the appropriate t-quantile, here with 35 degrees of freedom i.e. 2.030 instead of 1.96 ȳ j ȳ 0 ± 2.030 ŝ 1 n 0 + 1 n j. 33 / 43 34 / 43 Walds test Multiple comparisons The simple ratio: t = b j SD( b j ) = ȳj ȳ 0 SD(ȳ j ȳ 0 ). For large samples, this quantity will have an approximate N (0, 1) distribution, For smaller samples, we should instead use the appropriate t-distribution, here t(35). Cream vs. Butter vs. Method Cream Cheese Cream Cheese Individual comparisons Normal approx. (12.44, 67.58) ( 72.10, 11.70) t approx. (11.46, 68.57) ( 73.18, 10.61) Comparisons to reference Bonferroni/Sidak (2.97, 77.05) ( 82.47, 1.32) Dunnett (3.99, 76.03) ( 81.36, 2.44) 35 / 43 36 / 43

Multiple comparisons, cont d Model check Cream vs. Butter vs. Method Cream Cheese Cream Cheese A single comparison t approx. (11.46, 68.57) ( 73.18, 10.61) All pairwise comparisons Bonferroni/Sidak ( 2.13, 82.15) ( 88.06, 4.27) Tukey-Kramer ( 0.43, 80.45) ( 86.20, 2.40) Residuals: r i = y i ŷ i = y i m j(i) Graphics: Variance homogeneity Residuals vs. dairy product Residuals vs. predicted Normality Quantile plot of residuals Histogram of residuals 37 / 43 38 / 43 Need for transformation? Quantile plot is hammock -shaped Distribution skewed to the right Take logarithms, e.g. base 10: y i = log 10 (y i ) Hardly any changes in model fit 39 / 43 40 / 43

Product Parameter Estimate SD 95% CI Cream cheese a = m 0 2.172 0.0270 (2.117, 2.227) Sour cream b 1 = m 1 m 0 0.148 0.0413 (0.064, 0.232) Cream b 2 = m 2 m 0 0.107 0.0349 (0.036, 0.178) Mixed butter b 3 = m 3 m 0 0.150 0.0413 ( 0.233, 0.066) Butter b 4 = m 4 m 0 0.128 0.0382 ( 0.206, 0.051) 41 / 43 42 / 43 Product Estimated Ratio 95% CI Sour cream 1.41 (1.16, 1.71) Cream 1.28 (1.09, 1.51) Mixed butter 0.71 (0.58, 0.86) Butter 0.74 (0.62, 0.89) 43 / 43