DOC PREVIEW
UW-Madison STAT 572 - Analysis of Covariance

This preview shows page 1 out of 4 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

The Big Picture Analysis of Covariance The Big Picture Analysis of covariance is the term given to the special case of a linear model where there are a mix of categorical and quantitative explanatory variables Analysis of Covariance With a single categorical and a single quantitative explanatory variable the analysis consists of fitting separate lines to each group Bret Larget A model fit without an interaction term assumes that the slopes for all groups are identical but that the intercepts are potentially different Departments of Botany and of Statistics University of Wisconsin Madison A model with an interaction term allows for both different slopes and intercepts for each group February 27 2007 The fitted model when interactions are included is identical to fitting separate regression lines However inference can differ when fitting a single model as compared to fitting separate regression models for each group because error estimates are shared across models Statistics 572 Spring 2007 Analysis of Covariance Case Study March 1 2007 1 16 Statistics 572 Spring 2007 Analysis of Covariance Birds and Bats Case Study Birds and Bats 2 16 Birds and Bats Data bats read table bats txt header T bats Birds and bats must expend considerable energy to fly Some bats use echolocation in flight which also requires energy Other bats eat fruit and do not have the ability to echolocate Scientists studied energy use of several species of birds and bats to examine the relationship between mass and energy expenditure during flight to see if echolocating bats had a higher cost Variables are mass grams type factor with levels bird eBat and nBat latter two for echolocating and non echolocating and the response energy Watts Statistics 572 Spring 2007 March 1 2007 Analysis of Covariance March 1 2007 3 16 species 1 PteropusGouldi 2 PteropusPoliocephalus 3 HypsignathusMonstrosus 4 EidolonHelvum 5 MeliphagaVirescens 6 MelipsittacusUndulatus 7 SturmisVulgaris 8 FalcoSpaverius 9 FalcoTinnunculus 10 CorvusOssifragus 11 LarusAtricilla 12 ColumbaLivia 13 ColumbaLivia 14 ColumbaLivia 15 ColumbaLivia 16 CorvusCrytoleucos 17 PhyllostomasHastatus 18 PlecotusAuritus 19 PipistrellusPipistrellus 20 PlecotusAuritus mass 779 0 628 0 258 0 315 0 24 3 35 0 72 8 120 0 213 0 275 0 370 0 384 0 442 0 412 0 330 0 480 0 93 0 8 0 6 7 7 7 Statistics 572 Spring 2007 type energy nBat 43 70 nBat 34 80 nBat 23 30 nBat 22 40 bird 2 46 bird 3 93 bird 9 15 bird 13 80 bird 14 60 bird 22 80 bird 26 20 bird 25 90 bird 29 50 bird 43 70 bird 34 00 bird 27 80 eBat 8 83 eBat 1 35 eBat 1 12 eBat 1 02 Notice that both mass and energy span different orders of magnitude The two bat types are quite different in mass Birds fill the gap Each observation corresponds to a single study Some studies are on the same species Analysis of Covariance March 1 2007 4 16 Birds and Bats Case Study Case Study Scatterplot Birds and Bats Transformed Data bird eBat nBat 40 Log transformation of both variables leads to data that better fitslinear model assumptions 3 0 0 2 0 200 400 600 800 2 3 4 mass Statistics 572 Spring 2007 Analysis of Covariance 5 6 log mass March 1 2007 5 16 Statistics 572 Spring 2007 Birds and Bats Case Study log energy energy 20 attach bats pch b unclass type col b unclass type 1 plot energy mass pch pch b col col b cex 1 5 legend 0 40 levels type pch 1 3 col 2 4 10 Analysis of Covariance Case Study Null Model without type March 1 2007 Null Model Plots 0 1 2 3 7 16 Statistics 572 Spring 2007 2 1 0 4 2 1 1 2 Analysis of Covariance 2 3 4 1 2 14 15 1 1 0 5 0 1 8 0 Residuals vs Leverage 14 15 Theoretical Quantiles Scale Location Fitted values March 1 2007 Fitted values 0 Analysis of Covariance 14 15 8 1 0 0 0 2 Standardized residuals Adequate fit Standardized residuals 0 4 1 0 2 Residuals No highly influential points 1 5 Analysis of Variance Table 8 1 0 Fitted model has a single slope and intercept anova bats0 lm The residual plot indicates potential minor heterskedasticity and non linearity primarily due to the two bird studies with highest energy Standardized residuals Estimate Std Error t value Pr t Intercept 1 4682584 0 1371618 10 70457 3 101143e 09 log mass 0 8086098 0 0268400 30 12704 7 440291e 17 0 5 par mfrow c 2 2 plot bats0 lm Normal Q Q 14 15 0 0 bats0 lm lm log energy log mass summary bats0 lm coefficients Statistics 572 Spring 2007 6 16 Birds and Bats Residuals vs Fitted Response log energy Df Sum Sq Mean Sq F value Pr F log mass 1 29 3919 29 3919 907 64 2 2e 16 Residuals 18 0 5829 0 0324 Signif codes 0 0 001 0 01 0 05 0 1 bats0 form formula log energy log mass plot bats0 form pch pch b col col b cex 1 5 legend 2 4 levels type pch 1 3 col 2 4 1 bird eBat nBat 30 distance Cook s 0 00 0 10 20 0 20 Leverage March 1 2007 8 16 Case Study Birds and Bats Birds and Bats Case Study Null Model Plots Model with type bats1 lm lm log energy log mass type summary bats1 lm coefficients 0 4 Residuals vs Fitted 0 3 14 0 1 0 0 Residuals Adding multiple intercepts does not improve fit significantly 0 1 1 Response log energy Df Sum Sq Mean Sq F value Pr F log mass 1 29 3919 29 3919 849 9108 2 691e 15 type 2 0 0296 0 0148 0 4276 0 6593 Residuals 16 0 5533 0 0346 Signif codes 0 0 001 0 01 0 05 0 1 2 3 4 Fitted values lm log energy log mass Analysis of Covariance Case Study anova bats1 lm 8 0 Statistics 572 Spring 2007 Fitted model has a single slope but different intercept for each type Analysis of Variance Table 0 2 Here is how to add plotting characters and color to a residual plot 0 2 plot bats0 lm which 1 pch pch b col col b abline h 0 15 Estimate Std Error t value Pr t Intercept 1 47409828 0 23901543 6 1673771 1 352481e 05 log mass 0 81495749 0 04454143 18 2966182 3 757576e 12 typeeBat 0 02359824 0 15760050 0 1497345 8 828453e 01 typenBat 0 10226192 0 11418264 0 8955995 3 837430e 01 March 1 2007 Birds and Bats Analysis of Covariance Case Study Residual Plot 1 cf1 coef bats1 lm int1 bird cf1 1 int1 eBat cf1 1 cf1 3 int1 nBat cf1 1 cf1 4 Statistics 572 Spring 2007 9 16 Type bird eBat nBat Intercept 1 474 1 498 1 576 Slope 0 815 0 815 0 815 March 1 2007 10 16 Birds and Bats Model with Interaction bats2 lm lm log energy log mass type round summary bats2 lm coefficients 4 …


View Full Document

UW-Madison STAT 572 - Analysis of Covariance

Download Analysis of Covariance
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Analysis of Covariance and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Analysis of Covariance and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?