This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: #Part b. Obtain a 95% prediction interval for the muscle mass of a #woman whose age is 60. #Using R functions: new<-data.frame(age=60) predict.lm(fit.1.27,new,interval="predict") # fit lwr upr # [1,] 84.94683 68.45067 101.443 #Interpretation: We can predict with 95% confidence that the muscle mass for a 60 year old woman not measured in the study will be between 68.45 and 101.44. #Compare the standard error for prediction to the standard error for Y.hat: Sheet1 Page 2 #Standard error for Y.hat: std.err.y60 <- 8.173*sqrt(1/60 + (60-mean(age))^2/sum((age-mean(age))^2)) std.err.y60 # 1.055131 #Standard error for Y.h(new): std.err.pred60 <- 8.173*sqrt(1+1/60 + (60-mean(age))^2/sum((age-mean(age))^2)) std.err.pred60 #  8.240827...
View Full Document
This note was uploaded on 06/16/2009 for the course STAT 540 taught by Professor Staff during the Spring '08 term at Colorado State.
- Spring '08
- Linear Regression