1 ANOVA Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data.

Slides:



Advertisements
Similar presentations
SPH 247 Statistical Analysis of Laboratory Data 1April 2, 2013SPH 247 Statistical Analysis of Laboratory Data.
Advertisements

ANOVA and Linear Models. Data Data is from the University of York project on variation in British liquids. Data is from the University of York project.
BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.
1 Some R Basics EPP 245/298 Statistical Analysis of Laboratory Data.
SPH 247 Statistical Analysis of Laboratory Data April 2, 2010SPH 247 Statistical Analysis of Laboratory Data1.
ANOVA: Analysis of Variation
Experimentos Fatoriais do tipo 2 k Capítulo 6. Analysis Procedure for a Factorial Design Estimate factor effects Formulate model –With replication, use.
Multiple Regression Predicting a response with multiple explanatory variables.
© 2010 Pearson Prentice Hall. All rights reserved Least Squares Regression Models.
Zinc Data SPH 247 Statistical Analysis of Laboratory Data.
Linear Modelling I Richard Mott Wellcome Trust Centre for Human Genetics.
Analysis of Variance and Multiple Comparisons Comparing more than two means and figuring out which are different.
x y z The data as seen in R [1,] population city manager compensation [2,] [3,] [4,]
REGRESSION Want to predict one variable (say Y) using the other variable (say X) GOAL: Set up an equation connecting X and Y. Linear regression linear.
SPH 247 Statistical Analysis of Laboratory Data 1April 23, 2010SPH 247 Statistical Analysis of Laboratory Data.
Basics of ANOVA Why ANOVA Assumptions used in ANOVA
1 Regression Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data.
1 Basic Statistical Analysis of Array Data EPP 245 Statistical Analysis of Laboratory Data.
1 Some R Basics EPP 245/298 Statistical Analysis of Laboratory Data.
Nemours Biomedical Research Statistics March 26, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
1 Logistic Regression Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data.
Crime? FBI records violent crime, z x y z [1,] [2,] [3,] [4,] [5,]
Linear Modelling I Richard Mott Wellcome Trust Centre for Human Genetics.
Checking Regression Model Assumptions NBA 2013/14 Player Heights and Weights.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
Lab 5 Hypothesis testing and Confidence Interval.
9/14/ Lecture 61 STATS 330: Lecture 6. 9/14/ Lecture 62 Inference for the Regression model Aim of today’s lecture: To discuss how we assess.
Analysis of Covariance Harry R. Erwin, PhD School of Computing and Technology University of Sunderland.
 Combines linear regression and ANOVA  Can be used to compare g treatments, after controlling for quantitative factor believed to be related to response.
7.1 - Motivation Motivation Correlation / Simple Linear Regression Correlation / Simple Linear Regression Extensions of Simple.
STATISTICAL INFERENCE PART IX HYPOTHESIS TESTING - APPLICATIONS – MORE THAN TWO POPULATION.
1 Two Color Microarrays EPP 245/298 Statistical Analysis of Laboratory Data.
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.
Regression and Analysis Variance Linear Models in R.
Lecture 9: ANOVA tables F-tests BMTRY 701 Biostatistical Methods II.
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.
Using R for Marketing Research Dan Toomey 2/23/2015
Exercise 1 The standard deviation of measurements at low level for a method for detecting benzene in blood is 52 ng/L. What is the Critical Level if we.
The Completely Randomized Design (§8.3)
Solutions to Tutorial 5 Problems Source Sum of Squares df Mean Square F-test Regression Residual Total ANOVA Table Variable.
Exercise 1 You have a clinical study in which 10 patients will either get the standard treatment or a new treatment Randomize which 5 of the 10 get the.
Illustrations using R B. Jones Dept. of Political Science UC-Davis.
Environmental Modeling Basic Testing Methods - Statistics III.
Chapter 8 Minitab Recipe Cards. Confidence intervals for the population mean Choose Basic Statistics from the Stat menu and 1- Sample t from the sub-menu.
Determining Factors of GPA Natalie Arndt Allison Mucha MA /6/07.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Lesson 14 - R Chapter 14 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
Dependent (response) Variable Independent (control) Variable Random Error XY x1x1 y1y1 x2x2 y2y2 …… xnxn ynyn Raw data: Assumption:  i ‘s are independent.
EPP 245 Statistical Analysis of Laboratory Data 1April 23, 2010SPH 247 Statistical Analysis of Laboratory Data.
1 Peter Fox Data Analytics – ITWS-4600/ITWS-6600 Week 2b, February 5, 2016 Lab exercises: beginning to work with data: filtering, distributions, populations,
The p-value approach to Hypothesis Testing
Tutorial 5 Thursday February 14 MBP 1010 Kevin Brown.
Comparing 2 populations. Placebo go to see a doctor.
1 Analysis of Variance (ANOVA) EPP 245/298 Statistical Analysis of Laboratory Data.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 10: Comparing Models.
Spearman’s Rank Correlation
Stat 251 (2009, Summer) Final Lab TA: Yu, Chi Wai.
Chapter 12 Simple Linear Regression and Correlation
Statistical Science 9544A Case Study II.
CHAPTER 7 Linear Correlation & Regression Methods
Console Editeur : myProg.R 1
Comparing k Populations
Chapter 12 Simple Linear Regression and Correlation
STAT Z-Tests and Confidence Intervals for a
Summary of Tests Confidence Limits
Confidence Interval.
Estimating the Variance of the Error Terms
Analysis of Variance (ANOVA)
Presentation transcript:

1 ANOVA Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 2 Exercise 6.1 > library(ISwR) Loading required package: survival Loading required package: splines > data(zelazo) > zelazo $active [1] $passive [1] $none [1] $ctr.8w [1]

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 3 > age.walk <- c(zelazo$active,zelazo$passive,zelazo$none,zelazo$ctr.8w) > group <- rep(c("active","passive","none","ctr.8w"),c(6,6,6,5)) > group <- as.factor(group) > group [1] active active active active active active passive passive passive [10] passive passive passive none none none none none none [19] ctr.8w ctr.8w ctr.8w ctr.8w ctr.8w Levels: active ctr.8w none passive > anova(lm(age.walk ~ group)) Analysis of Variance Table Response: age.walk Df Sum Sq Mean Sq F value Pr(>F) group Residuals > plot(age.walk ~ group)

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 4

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 5 > mgroup <- rep(c("active","passive","none"),c(6,6,11)) > mgroup <- as.factor(mgroup) > anova(lm(age.walk ~ mgroup)) Analysis of Variance Table Response: age.walk Df Sum Sq Mean Sq F value Pr(>F) mgroup Residuals Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 > t.test(zelazo$active,c(zelazo$none,zelazo$ctr.8w)) Welch Two Sample t-test data: zelazo$active and c(zelazo$none, zelazo$ctr.8w) t = , df = 9.327, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of x mean of y

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 6 Exercise 6.2 Lung data set has columns –volume = measured lung volume –method = method of measurement –subject = subject Compare the methods. Are they different? Which ones differ?

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 7 > attach(lung) > lm(volume ~ method + subject) Call: lm(formula = volume ~ method + subject) Coefficients: (Intercept) methodB methodC subject2 subject3 subject subject5 subject > lung.lm <- lm(volume ~ method + subject) > anova(lung.lm) Analysis of Variance Table Response: volume Df Sum Sq Mean Sq F value Pr(>F) method * subject * Residuals Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 8 > tapply(volume,method,mean) A B C > tapply(volume,subject,mean) > diff(sort(tapply(volume,method,mean))) B C > plot(volume ~ method) > plot(lung.lm) Hit to see next plot: > help(plot.lm) > plot(lung.lm$resid ~ method)

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 9

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 10

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 11

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 12

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 13

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 14

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 15

November 10, 2004EPP 245 Statistical Analysis of Laboratory Data 16 > anova(lung.lm) Analysis of Variance Table Response: volume Df Sum Sq Mean Sq F value Pr(>F) method * subject * Residuals > diff(sort(tapply(volume,method,mean))) B C