hw3 - STAT 4220 HW3(20 points Due on Thu February 11 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 4220 HW3 (20 points) Due on Thu, February 11 1. Consider the CRD we discussed for estimating how the diets affect the coagulation rates of rabbits. The data are given on the K: drive. (a) (4 point) Use R to analyze the data as a completely randomized design. Write down the ANOVA table. See how I converted y and x into vectors. > data1 = read.table("data.3.1.txt") > data1 = as.matrix(data1) > y = as.vector(data1) > x = rep(1:4,each=4) > g = lm(y~factor(x)) > summary(aov(g)) (b) (2 points) Let us use the following commands now (without “factor”). > g1 = lm(y~x) > summary(aov(g1)) What is the difference and why is the difference? Explain clearly. (c) (2 points) Plot the residuals against the factor levels. It should be same as the following plot (note the labeling of the x-axis). > plot(x,g$res,xaxt="n") > mtext(paste("B"),side=1,at=2) > mtext(paste("C"),side=1,at=3) -4 -2 0 2 4 Plot of residual versus factor levels Diets Residuals B C D A (d) (2 points) Draw the Q-Q plot. (e) (1 point) Look at the ANOVA table in problem 1(a) again. What do
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hw3 - STAT 4220 HW3(20 points Due on Thu February 11 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online