Stat 112 Notes 23. Quiz 4 Info 4 double sided sheets of notes Covers interactions, models with categorical variables and interactions, one way analysis.

Slides:



Advertisements
Similar presentations
Class 21: Tues., Nov. 23 Today: Multicollinearity, One-way analysis of variance Schedule: –Tues., Nov. 30 th – Review, Homework 8 due –Thurs., Dec. 2 nd.
Advertisements

Stat 112: Lecture 7 Notes Homework 2: Due next Thursday The Multiple Linear Regression model (Chapter 4.1) Inferences from multiple regression analysis.
Lecture 28 Categorical variables: –Review of slides from lecture 27 (reprint of lecture 27 categorical variables slides with typos corrected) –Practice.
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Chapter 4 Randomized Blocks, Latin Squares, and Related Designs
Copyright © 2010 Pearson Education, Inc. Slide
Model Adequacy Checking in the ANOVA Text reference, Section 3-4, pg
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Variance Chapter 16.
Class 16: Thursday, Nov. 4 Note: I will you some info on the final project this weekend and will discuss in class on Tuesday.
Chapter 13 Multiple Regression
The Two Factor ANOVA © 2010 Pearson Prentice Hall. All rights reserved.
© 2010 Pearson Prentice Hall. All rights reserved The Complete Randomized Block Design.
Class 23: Thursday, Dec. 2nd Today: One-way analysis of variance, multiple comparisons. Next week: Two-way analysis of variance. I will the final.
Lecture 23: Tues., Dec. 2 Today: Thursday:
Lecture 13 – Tues, Oct 21 Comparisons Among Several Groups – Introduction (Case Study 5.1.1) Comparing Any Two of the Several Means (Chapter 5.2) The One-Way.
Stat 112: Lecture 10 Notes Fitting Curvilinear Relationships –Polynomial Regression (Ch ) –Transformations (Ch ) Schedule: –Homework.
Part I – MULTIVARIATE ANALYSIS
Chapter 12 Multiple Regression
Stat 112: Lecture 22 Notes Chapter 9.1: One-way Analysis of Variance. Chapter 9.3: Two-way Analysis of Variance Homework 6 is due on Friday.
Lecture 15: Tues., Mar. 2 Inferences about Linear Combinations of Group Means (Chapter 6.2) Chi-squared test (Handout/Notes) Thursday: Simple Linear Regression.
Stat 112: Lecture 23 Notes Chapter 9.3: Two-way Analysis of Variance Schedule: –Homework 6 is due on Friday. –Quiz 4 is next Tuesday. –Final homework assignment.
Lecture 14 – Thurs, Oct 23 Multiple Comparisons (Sections 6.3, 6.4). Next time: Simple linear regression (Sections )
Class 22: Tuesday, Nov. 30th Today: One-way analysis of variance I will you tonight or tomorrow morning with comments on your project. Schedule:
Lecture 25 Regression diagnostics for the multiple linear regression model Dealing with influential observations for multiple linear regression Interaction.
Lecture 19: Tues., Nov. 11th R-squared (8.6.1) Review
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,
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 14-1 Chapter 14 Introduction to Multiple Regression Basic Business Statistics 11 th Edition.
Lecture 24: Thurs., April 8th
Lecture 27 Polynomial Terms for Curvature Categorical Variables.
Stat 112: Lecture 20 Notes Chapter 7.2: Interaction Variables. Chapter 8: Model Building. I will Homework 6 by Friday. It will be due on Friday,
Lecture 12 One-way Analysis of Variance (Chapter 15.2)
Stat Today: Multiple comparisons, diagnostic checking, an example After these notes, we will have looked at (skip figures 1.2 and 1.3, last.
Ch. 14: The Multiple Regression Model building
Class 24: Tues., Dec. 7th Today: Two-way analysis of variance Thursday: Design of Experiments Schedule: –Thurs., Dec. 9 th – Final class –Mon., Dec. 13.
Class 20: Thurs., Nov. 18 Specially Constructed Explanatory Variables –Dummy variables for categorical variables –Interactions involving dummy variables.
Stat 112: Lecture 21 Notes Model Building (Brief Discussion) Chapter 9.1: One way Analysis of Variance. Homework 6 is due Friday, Dec. 1 st. I will be.
Stat 112: Lecture 16 Notes Finish Chapter 6: –Influential Points for Multiple Regression (Section 6.7) –Assessing the Independence Assumptions and Remedies.
Two-Way Analysis of Variance STAT E-150 Statistical Methods.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 13-1 Chapter 13 Introduction to Multiple Regression Statistics for Managers.
Slide 1 SOLVING THE HOMEWORK PROBLEMS Simple linear regression is an appropriate model of the relationship between two quantitative variables provided.
Inference for regression - Simple linear regression
LEARNING PROGRAMME Hypothesis testing Intermediate Training in Quantitative Analysis Bangkok November 2007.
Adapted by Peter Au, George Brown College McGraw-Hill Ryerson Copyright © 2011 McGraw-Hill Ryerson Limited.
Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 25 Categorical Explanatory Variables.
SPSS Series 1: ANOVA and Factorial ANOVA
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Comparing Three or More Means 13.
Agresti/Franklin Statistics, 1 of 82 Chapter 13 Comparing Groups: Analysis of Variance Methods Learn …. How to use Statistical inference To Compare Several.
Regression Part II One-factor ANOVA Another dummy variable coding scheme Contrasts Multiple comparisons Interactions.
Chapter 14 Introduction to Multiple Regression
Analysis of variance Petter Mostad Comparing more than two groups Up to now we have studied situations with –One observation per object One.
Stat 112 Notes 20 Today: –Interaction Variables (Chapter ) –Interpreting slope when Y is logged but not X –Model Building (Chapter 8)
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.
6/2/2016Slide 1 To extend the comparison of population means beyond the two groups tested by the independent samples t-test, we use a one-way analysis.
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Chapter 13 Multiple Regression
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.1 One-Way ANOVA: Comparing.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 13: One-way ANOVA Marshall University Genomics Core.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.3 Two-Way ANOVA.
Stat 112 Notes 5 Today: –Chapter 3.7 (Cautions in interpreting regression results) –Normal Quantile Plots –Chapter 3.6 (Fitting a linear time trend to.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 14-1 Chapter 14 Introduction to Multiple Regression Statistics for Managers using Microsoft.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 14-1 Chapter 14 Introduction to Multiple Regression Basic Business Statistics 10 th Edition.
Soc 3306a Lecture 7: Inference and Hypothesis Testing T-tests and ANOVA.
Stat 112: Lecture 22 Notes Chapter 9.1: One Way Analysis of Variance Chapter 9.2: Two Way Analysis of Variance.
One-way ANOVA Example Analysis of Variance Hypotheses Model & Assumptions Analysis of Variance Multiple Comparisons Checking Assumptions.
Analysis of Variance STAT E-150 Statistical Methods.
Stat 112 Notes 14 Assessing the assumptions of the multiple regression model and remedies when assumptions are not met (Chapter 6).
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 14-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Jump to first page Inferring Sample Findings to the Population and Testing for Differences.
Analysis of Variance l Chapter 8 l 8.1 One way ANOVA
Presentation transcript:

Stat 112 Notes 23

Quiz 4 Info 4 double sided sheets of notes Covers interactions, models with categorical variables and interactions, one way analysis of variance and two way analysis of variance. I will Homework 6 solutions tonight. I will post solutions to practice quiz problems tonight. Office hours: usual office hours today, after class; extra office hours, Wed., 8:45-9:45. Cristina will hold office hours, Wed. 2-3.

Analysis of Variance Terminology Analysis of variance is generally concerned with comparing the means of different groups and is a special case of regression in which all the explanatory variables are categorical variables. The criterion (criteria) by which we classify the groups in analysis of variance is called a factor. In one-way analysis of variance, we have one factor. The possible values of the factor are levels. Milgram’s study: Factor is experimental condition with levels remote, voice-feedback, proximity and touch- proximity. Two-way analysis of variance: Groups are classified by two factors.

Two-way Analysis of Variance Examples Milgram’s study: In thinking about the Obedience to Authority study, many people have thought that women would react differently than men. Two-way analysis of variance setup in which the two factors are experimental condition (levels remote, voice-feedback, proximity, touch-proximity) and sex (levels male, female). Package Design Experiment: Several new types of cereal packages were designed. Two colors and two styles of lettering were considering. Each combination of lettering/color was used to produce a package, and each of these combinations was test marketed in 12 comparable stores and sales in the stores were recorded.. Two-way analysis of variance in which two factors are color (levels red, green) and lettering (levels block, script). Goal of two-way analysis of variance: Find out how the mean response in a group depends on the levels of both factors and find the best combination.

Two-way Analysis of Variance The mean of the group with the ith level of factor 1 and the jth level of factor 2 is denoted, e.g., in package-design experiment, the four group means are As with one-way analysis of variance, two-way analysis of variance can be seen as a a special case of multiple regression. For two-way analysis of variance, we have two categorical explanatory variables for the two factors and also include an interaction between the factors.

Two-way ANOVA in JMP Use Analyze, Fit Model with a categorical variable for the first factor, a categorical variable for the second factor and an interaction variable that crosses the first factor and the second factor. The LS Means Plots (which show how the means of the groups vary as the levels of the factor vary) are produced by going to the output in JMP for each variable that is to the right of the main output, clicking the red triangle next to each variable (for package design, the vairables are Color, TypeStyle, Typestyle*Color) and clicking LS Means Plot.

Estimated Mean for Red Block group = = Estimated Mean for Red Script group = =

The LS Means Plots show how the means of the groups vary as the levels of the factors vary. For the top plot for color, green refers to the mean of the two green groups (green block and green script) and red refers to the mean of the two red groups (red block and red script). Similarly for the second plot for TypeStyle, block refers to the mean of the two block groups (red block and green block). The third plot for TypeStyle*Color shows the mean of all four groups.

Interaction in Two-Way ANOVA Interaction between two factors: The impact of one factor on the response depends on the level of the other factor. For package design experiment, there would be an interaction between color and typestyle if the impact of color on sales depended on the level of typestyle. Formally, there is an interaction if LS Means Plot suggests there is not much interaction. Impact of changing color from red to green on mean sales is about the same when the typestyle is block as when the typestyle is script.

Effect Test for Interaction A formal test of the null hypothesis that there is no interaction, for all levels i,j,i’,j’ of factors 1 and 2, versus the alternative hypothesis that there is an interaction is given by the Effect Test for the interaction variable (here Typestyle*Color). p-value for Effect Test = No evidence of an interaction.

Implications of No Interaction When there is no interaction, the two factors can be looked in isolation, one at a time. When there is no interaction, best group is determined by finding best level of factor 1 and best level of factor 2 separately. For package design experiment, suppose there are two separate groups: one with an expertise in lettering and the other with expertise in coloring. If there is no interaction, groups can work independently to decide best letter and color. If there is an interaction, groups need to get together to decide on best combination of letter and color.

Model when There is No Interaction When there is no evidence of an interaction, we can drop the interaction term from the model for parsimony and more accurate estimates: Mean for red block group = = Mean for red script group = =165.92

Tests for Main Effects When There is No Interaction Effect test for color: Tests null hypothesis that group mean does not depend on color versus alternative that group mean is different for at least two levels of color. p-value =0.0804, moderate but not strong evidence that group mean depends on color. Effect test for TypeStyle: Tests null hypothesis that group mean does not depend on TypeStyle versus alternative that group mean is different for at least two levels of TypeStyle. p-value = , evidence that group mean depends on TypeStyle. These are called tests for “main effects.” These tests only make sense when there is no interaction.

Example with an Interaction Should the clerical employees of a large insurance company be switched to a four-day week, allowed to use flextime schedules or kept to the usual 9-to-5 workday? The data set flextime.JMP contains percentage efficiency gains over a four week trial period for employees grouped by two factors: Department (Claims, Data Processing, Investment) and Condition (Flextime, Four-day week, Regular Hours).

Which schedule is best appears to differ by department. Four day is best for investment employees, but worst for data processing employees.

Which Combinations Works Best? For which pairs of groups is there strong evidence that the groups have different means – is there strong evidence that one combination works best? Click the Red Triangle next to the interaction (Department*Condition), above the interaction’s leverage plot. Then click LSMeans Tukey HSD. This compares the different groups pairwise, adjusting for multiple comparisons.

Checking Assumptions As with one-way ANOVA, two-way ANOVA is a special case of multiple regression and relies on the assumptions: –Linearity: Automatically satisfied –Constant variance: Spread within groups is the same for all groups. –Normality: Distribution within each group is normal. To check assumptions, combine two factors into one factor (Combination) and check assumptions as in one-way ANOVA.

Checking Assumptions Check for constant variance: (Largest standard deviation of group/Smallest standard deviation of group) =(44.85/33.51) <2. Constant variance OK. Check for normality: Look at normal quantile plots for each combination (not shown). For all normal quantile plots, the points fall within the 95% confidence bands. Normality assumption OK.

Two way Analysis of Variance: Steps in Analysis 1.Check assumptions (constant variance, normality, independence). If constant variance is violated, try transformations. 2.Use the effect test (commonly called the F-test) to test whether there is an interaction. 3.If there is no interaction, use the main effect tests to test whether each factor has an effect. The different levels of a factor can be compared in a way that accounts for multiple comparisions by clicking on the red triangle next to the factor and clicking LS Means Tukey HSD. 4.If there is an interaction, use the interaction plot to visualize the interaction. To examine the differences between different combinations, click the red triangle next to the interaction and click LS Means Tukey HSD.