SPH 247 Statistical Analysis of Laboratory Data April 2, 2010SPH 247 Statistical Analysis of Laboratory Data1.

Slides:



Advertisements
Similar presentations
Lecture 10 F-tests in MLR (continued) Coefficients of Determination BMTRY 701 Biostatistical Methods II.
Advertisements

SPH 247 Statistical Analysis of Laboratory Data 1April 2, 2013SPH 247 Statistical Analysis of Laboratory Data.
1 Some R Basics EPP 245/298 Statistical Analysis of Laboratory Data.
5/11/ lecture 71 STATS 330: Lecture 7. 5/11/ lecture 72 Prediction Aims of today’s lecture  Describe how to use the regression model to.
Generalized Linear Models (GLM)
Multiple Regression Predicting a response with multiple explanatory variables.
Zinc Data SPH 247 Statistical Analysis of Laboratory Data.
Multiple regression analysis
x y z The data as seen in R [1,] population city manager compensation [2,] [3,] [4,]
1 ANOVA Homework Solutions EPP 245/298 Statistical Analysis of Laboratory Data.
SPH 247 Statistical Analysis of Laboratory Data 1April 23, 2010SPH 247 Statistical Analysis of Laboratory Data.
1 Multiple Regression EPP 245/298 Statistical Analysis of Laboratory Data.
Examining Relationship of Variables  Response (dependent) variable - measures the outcome of a study.  Explanatory (Independent) variable - explains.
1 Some R Basics EPP 245/298 Statistical Analysis of Laboratory Data.
Nemours Biomedical Research Statistics April 2, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
7/2/ Lecture 51 STATS 330: Lecture 5. 7/2/ Lecture 52 Tutorials  These will cover computing details  Held in basement floor tutorial lab,
1 Analysis of Variance (ANOVA) EPP 245 Statistical Analysis of Laboratory Data.
Crime? FBI records violent crime, z x y z [1,] [2,] [3,] [4,] [5,]
1 Regression and Calibration EPP 245 Statistical Analysis of Laboratory Data.
Regression Transformations for Normality and to Simplify Relationships U.S. Coal Mine Production – 2011 Source:
SPH 247 Statistical Analysis of Laboratory Data April 9, 2013SPH 247 Statistical Analysis of Laboratory Data1.
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.
How to plot x-y data and put statistics analysis on GLEON Fellowship Workshop January 14-18, 2013 Sunapee, NH Ari Santoso.
Inference for regression - Simple linear regression
BIOL 582 Lecture Set 19 Matrices, Matrix calculations, Linear models using linear algebra.
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.
MATH 3359 Introduction to Mathematical Modeling Project Multiple Linear Regression Multiple Logistic Regression.
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.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
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.
1 Peter Fox Data Analytics – ITWS-4963/ITWS-6965 Week 4b, February 20, 2015 Lab: regression, kNN and K- means results, interpreting and evaluating models.
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
FACTORS AFFECTING HOUSING PRICES IN SYRACUSE Sample collected from Zillow in January, 2015 Urban Policy Class Exercise - Lecy.
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.
Statistics for Business and Economics 8 th Edition Chapter 11 Simple Regression Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Ch.
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
Tutorial 4 MBP 1010 Kevin Brown. Correlation Review Pearson’s correlation coefficient – Varies between – 1 (perfect negative linear correlation) and 1.
Lecture 7: Multiple Linear Regression Interpretation with different types of predictors BMTRY 701 Biostatistical Methods II.
Lecture 6: Multiple Linear Regression Adjusted Variable Plots BMTRY 701 Biostatistical Methods II.
Determining Factors of GPA Natalie Arndt Allison Mucha MA /6/07.
28. Multiple regression The Practice of Statistics in the Life Sciences Second Edition.
Lecture 6: Multiple Linear Regression Adjusted Variable Plots BMTRY 701 Biostatistical Methods II.
Lecture 3 Linear Models II Olivier MISSA, Advanced Research Skills.
Linear Models Alan Lee Sample presentation for STATS 760.
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.
EPP 245 Statistical Analysis of Laboratory Data 1April 23, 2010SPH 247 Statistical Analysis of Laboratory Data.
Tutorial 5 Thursday February 14 MBP 1010 Kevin Brown.
Nemours Biomedical Research Statistics April 9, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
1 Analysis of Variance (ANOVA) EPP 245/298 Statistical Analysis of Laboratory Data.
1 Analysis of Variance (ANOVA) EPP 245/298 Statistical Analysis of Laboratory Data.
Appendix I A Refresher on some Statistical Terms and Tests.
Before the class starts: Login to a computer Read the Data analysis assignment 1 on MyCourses If you use Stata: Start Stata Start a new do file Open the.
WSUG M AY 2012 EViews, S-Plus and R Damian Staszek Bristol Water.
Data Analytics – ITWS-4600/ITWS-6600
Chapter 12 Simple Linear Regression and Correlation
CHAPTER 7 Linear Correlation & Regression Methods
Correlation and regression
Lecture 12 More Examples for SLR More Examples for MLR 9/19/2018
Console Editeur : myProg.R 1
Chapter 12 Simple Linear Regression and Correlation
Estimating the Variance of the Error Terms
EPP 245 Statistical Analysis of Laboratory Data
Analysis of Variance (ANOVA)
Presentation transcript:

SPH 247 Statistical Analysis of Laboratory Data April 2, 2010SPH 247 Statistical Analysis of Laboratory Data1

R and Stata R and Stata both have many of the same functions Stata can be run more easily as “point and shoot” Both should be run from command files to document analyses Neither is really harder than the other, but the syntax and overall conception is different April 2, 2010SPH 247 Statistical Analysis of Laboratory Data2

Origins S was a statistical and graphics language developed at Bell Labs in the “one letter” days (i.e., the c programming language) R is an implementation of S, as is S-Plus, a commercial statistical package R is free, open source, runs on Windows, OS X, and Linux April 2, 2010SPH 247 Statistical Analysis of Laboratory Data3

Why use R? Bioconductor is a project collecting packages for biological data analysis, graphics, and annotation Most of the better methods are only available in Bioconductor or stand-alone packages With some exceptions, commercial microarray analysis packages are not competitive April 2, 2010SPH 247 Statistical Analysis of Laboratory Data4

Getting Data into R Many times the most direct method is to edit the data in Excel, Export as a.txt file, then import to R using read.delim We will do this two ways for some energy expenditure data Frequently, the data from studies I am involved in arrives in Excel April 2, 2010SPH 247 Statistical Analysis of Laboratory Data5

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data6 energy package:ISwR R Documentation Energy expenditure Description: The 'energy' data frame has 22 rows and 2 columns. It contains data on the energy expenditure in groups of lean and obese women. Format: This data frame contains the following columns: expend a numeric vector. 24 hour energy expenditure (MJ). stature a factor with levels 'lean' and 'obese'. Source: D.G. Altman (1991), _Practical Statistics for Medical Research_, Table 9.4, Chapman & Hall.

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data7 > setwd("c:/td/classes/SPH Spring/RData/") > source("energy.r",echo=T) > eg <- read.delim("energy1.txt") > eg Obese Lean NA NA NA NA 8.11

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data8 > class(eg) [1] "data.frame" > t.test(eg$Obese,eg$Lean) Welch Two Sample t-test data: eg$Obese and eg$Lean t = , df = , 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

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data9 > attach(eg) > t.test(Obese, Lean) Welch Two Sample t-test data: Obese and Lean t = , df = , 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 > detach(eg)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data10 > eg2 <- read.delim("energy2.txt") > eg2 expend stature Obese Obese Obese Obese Obese Obese Obese Obese Obese Lean Lean Lean Lean Lean Lean Lean Lean Lean Lean Lean Lean Lean

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data11 > class(eg2) [1] "data.frame" > t.test(eg2$expend ~ eg2$stature) Welch Two Sample t-test data: eg2$expend by eg2$stature t = , df = , p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean in group Lean mean in group Obese

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data12 > attach(eg2) > t.test(expend ~ stature) Welch Two Sample t-test data: expend by stature t = , df = , p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean in group Lean mean in group Obese > mean(expend[stature == "Lean"]) [1] > mean(expend[stature == "Obese"]) [1] > detach(eg2)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data13 > tapply(expend, stature, mean) Lean Obese > tmp <- tapply(expend, stature, mean) > class(tmp) [1] "array" > dim(tmp) [1] 2 > tmp[1] - tmp[2] Lean > detach(eg2)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data14 source(“myprogs.r”) mystats <- function(df) { groups <- sort(unique(df[,2])) m <- length(groups) for (i in 1:m) { subseti <- df[,2]==groups[i] print(mean(df[subseti,1])) } > mystats(eg2) [1] [1]

Using R for Linear Regression The lm() command is used to do linear regression In many statistical packages, execution of a regression command results in lots of output In R, the lm() command produces a linear models object that contains the results of the linear model April 2, 2010SPH 247 Statistical Analysis of Laboratory Data15

Formulas, output and extractors If gene.exp is a response, and rads is a level of radiation to which the cell culture is exposed, then lm(gene.exp ~ rads) computes the regression lmobj <- lm(gene.exp ~ rads) Summary(lmobj) coef, resid(), fitted, … April 2, 2010SPH 247 Statistical Analysis of Laboratory Data16

Example Analysis Standard aqueous solutions of fluorescein (in pg/ml) are examined in a fluorescence spectrometer and the intensity (arbitrary units) is recorded What is the relationship of intensity to concentration Use later to infer concentration of labeled analyte April 2, 2010SPH 247 Statistical Analysis of Laboratory Data17

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data18 concentration <- c(0,2,4,6,8,10,12) intensity <- c(2.1,5.0,9.0,12.6,17.3,21.0,24.7) fluor <- data.frame(concentration,intensity) > fluor concentration intensity > attach(fluor) > plot(concentration,intensity) > title("Intensity vs. Concentration”)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data19

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data20 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data21 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Formula

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data22 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Residuals

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data23 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Slope coefficient

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data24 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Intercept (intensity at zero concentration)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data25 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Variability around regression line

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data26 > fluor.lm <- lm(intensity ~ concentration) > summary(fluor.lm) Call: lm(formula = intensity ~ concentration) Residuals: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) ** concentration e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 5 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: 2228 on 1 and 5 DF, p-value: 8.066e-08 Test of overall significance of model

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data27 > plot(concentration,intensity,lw=2) > title("Intensity vs. Concentration") > abline(coef(fluor.lm),lwd=2,col="red") > plot(fitted(fluor.lm),resid(fluor.lm)) > abline(h=0) The first of these plots shows the data points and the regression line. The second shows the residuals vs. fitted values, which is better at detecting nonlinearity

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data28

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data29

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data30 > setwd("c:/td/classes/SPH Spring/RData/") > source(“wright.r”) > cor(wright) std.wright mini.wright std.wright mini.wright > wplot1() File wright.r: library(ISwR) data(wright) attach(wright) wplot1 <- function() { plot(std.wright,mini.wright,xlab="Standard Flow Meter", ylab="Mini Flow Meter",lwd=2) title("Mini vs. Standard Peak Flow Meters") wright.lm <- lm(mini.wright ~ std.wright) abline(coef(wright.lm),col="red",lwd=2) } detach(wright)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data31

Cystic Fibrosis Data Cystic fibrosis lung function data lung function data for cystic fibrosis patients (7-23 years old) age a numeric vector. Age in years. sex a numeric vector code. 0: male, 1:female. height a numeric vector. Height (cm). weight a numeric vector. Weight (kg). bmp a numeric vector. Body mass (% of normal). fev1 a numeric vector. Forced expiratory volume. rv a numeric vector. Residual volume. frc a numeric vector. Functional residual capacity. tlc a numeric vector. Total lung capacity. pemax a numeric vector. Maximum expiratory pressure. April 2, 2010SPH 247 Statistical Analysis of Laboratory Data32

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data33 cf <- read.csv("cystfibr.csv") pairs(cf) attach(cf) cf.lm <- lm(pemax ~ age+sex+height+weight+bmp+fev1+rv+frc+tlc) print(summary(cf.lm)) print(anova(cf.lm)) print(drop1(cf.lm,test="F")) plot(cf.lm) step(cf.lm) detach(cf)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data34

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data35 > source("cystfibr.r") > cf.lm <- lm(pemax ~ age + sex + height + weight + bmp + fev1 + rv + frc + tlc) > print(summary(cf.lm)) … Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) age sex height weight bmp fev rv frc tlc Residual standard error: on 15 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: on 9 and 15 DF, p-value:

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data36 > print(anova(cf.lm)) Analysis of Variance Table Response: pemax Df Sum Sq Mean Sq F value Pr(>F) age ** sex height weight bmp fev rv frc tlc Residuals Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Performs sequential ANOVA

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data37 > print(drop1(cf.lm, test = "F")) Single term deletions Model: pemax ~ age + sex + height + weight + bmp + fev1 + rv + frc + tlc Df Sum of Sq RSS AIC F value Pr(F) age sex height weight bmp fev rv frc tlc Performs Type III ANOVA

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data38

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data39

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data40

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data41

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data42 > step(cf.lm) Start: AIC= pemax ~ age + sex + height + weight + bmp + fev1 + rv + frc + tlc Df Sum of Sq RSS AIC - sex tlc height age frc fev rv weight bmp Step: AIC=167.2 pemax ~ age + height + weight + bmp + fev1 + rv + frc + tlc ……………

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data43 Step: AIC= pemax ~ weight + bmp + fev1 + rv Df Sum of Sq RSS AIC rv bmp fev weight Call: lm(formula = pemax ~ weight + bmp + fev1 + rv) Coefficients: (Intercept) weight bmp fev1 rv

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data44 > cf.lm2 <- lm(pemax ~ rv+bmp+fev1+weight) > summary(cf.lm2) Call: lm(formula = pemax ~ rv + bmp + fev1 + weight) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) rv bmp * fev * weight *** --- Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: on 20 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: on 4 and 20 DF, p-value:

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data45 red.cell.folate package:ISwR R Documentation Red cell folate data Description: The 'folate' data frame has 22 rows and 2 columns. It contains data on red cell folate levels in patients receiving three different methods of ventilation during anesthesia. Format: This data frame contains the following columns: folate a numeric vector. Folate concentration ($mu$g/l). ventilation a factor with levels 'N2O+O2,24h': 50% nitrous oxide and 50% oxygen, continuously for 24~hours; 'N2O+O2,op': 50% nitrous oxide and 50% oxygen, only during operation; 'O2,24h': no nitrous oxide, but 35-50% oxygen for 24~hours.

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data46 > data(red.cell.folate) > help(red.cell.folate) > summary(red.cell.folate) folate ventilation Min. :206.0 N2O+O2,24h:8 1st Qu.:249.5 N2O+O2,op :9 Median :274.0 O2,24h :5 Mean : rd Qu.:305.5 Max. :392.0 > attach(red.cell.folate) > plot(folate ~ ventilation)

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data47 > folate.lm <- lm(folate ~ ventilation) > summary(folate.lm) Call: lm(formula = folate ~ ventilation) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-14 *** ventilationN2O+O2,op * ventilationO2,24h Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 19 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: on 2 and 19 DF, p-value:

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data48 > anova(folate.lm) Analysis of Variance Table Response: folate Df Sum Sq Mean Sq F value Pr(>F) ventilation * Residuals Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data49 > data(heart.rate) > attach(heart.rate) > heart.rate hr subj time

April 2, 2010SPH 247 Statistical Analysis of Laboratory Data50 > anova(hr.lm) Analysis of Variance Table Response: hr Df Sum Sq Mean Sq F value Pr(>F) subj e-16 *** time * Residuals Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Note that when the design is orthogonal, the ANOVA results don’t depend on the order of terms.

Exercises Download R and install from website Also download BioConductor source(" biocLite() Install package ISwR Try to replicate the analyses in the presentation April 2, 2010SPH 247 Statistical Analysis of Laboratory Data51