09_13 - anova(fite,fit) # f x4 = x1 - 2*x2 fitf = lm(y ~...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 x1 = c( 0,11,11, 7, 4,10, 5, 8) x2 = c( 1, 5, 4, 3, 1, 4, 4, 2) y = c(11,15,13,14, 0,19,16, 8) # a, b, c, d fit = lm(y ~ x1 + x2) summary(fit) # b anova(lm(y~1),fit) # c fitc = lm(y ~ x2) anova(fitc,fit) # d fitd = lm(y ~ x1) anova(fitc,fit) # e x3 = x2 + 1 x3 fite = lm(y ~ x1 + x3 + 0)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: anova(fite,fit) # f x4 = x1 - 2*x2 fitf = lm(y ~ x4) anova(fitf,fit) # g, h predict.lm(fit,data.frame(x1=2,x2=3),interval=c("prediction"),level=0.90) predict.lm(fit,data.frame(x1=8,x2=5),interval=c("prediction"),level=0.90)...
View Full Document

This note was uploaded on 04/29/2010 for the course STAT stat 420 taught by Professor Stepanov during the Spring '07 term at University of Illinois at Urbana–Champaign.

Ask a homework question - tutors are online