# HW3soln

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: q u a r e d : 0 . 9 9 4 5 F− s t a t i s t i c : 7 2 9 . 2 on 1 and 3 DF, p−v a l u e : 0 . 0 0 0 1 1 1 4 f. From the summary above, t test has t value -27 and p value 0.000111 (or F test has p value 0.0001114). So there is a signiﬁcant relationship between AverageWeight and Age. 3. Solution a. Here is the summary: > f i t 1=lm ( c o l o n i e s ˜ dose , data=s a l m o n e l l a ) > summary ( f i t 1 ) Call : lm ( f o r m u l a = c o l o n i e s ˜ dose , data = s a l m o n e l l a ) Residuals : Min 1Q − 13.488 − 8.991 Median − 1.569 3Q 7.569 Max 31.736 Coefficients : Estima te Std . E r r o r t ( Intercept ) 27.683154 3.462169 dose 0.005805 0.008006 −−− S i g n i f . c o d e s : 0 ∗∗∗ 0 . 0 0 1 ∗∗ v a l u e Pr ( > | t | ) 7 . 9 9 6 5 . 5 8 e −07 ∗∗∗ 0.725 0.479 0.01 ∗ 0.05 . 0.1 1 R e s i d u a l s t a n d a r d e r r o r : 1 2 . 0 8 on 16 d e g r e e s o f freedom M u l t i p l e R−s q u a r e d : 0 . 0 3 1 8 1 , Adjusted R−s q u a r e d : − 0.0287 F− s t a t i s t i c : 0 . 5 2 5 7 on 1 and 16 DF, p−v a l u e : 0 . 4 7 8 9 b. Lacking of Fitness testing is possible because the data contain replicates (multiple y values for the same x value). You can see it by listing the data. > salmonella [ 1 : 5 , ] c o l o n i e s dose 1 15 0 2 21 0 3 29 0 4 16 10 5 18 10 4 c. Here is the R output: > f i t 2=lm ( c o l o n i e s ˜ f a c t o r ( d o s e ) , data=s a l m o n e l l a ) > anova ( f i t 1 , f i t 2 ) A n a l y s i s o f V a r i a n c e Table Model 1 : c o l o n i e s ˜ d o s e Model 2 : c o l o n i e s ˜ f a c t o r ( d o s e ) Res . Df RSS Df Sum o f Sq F Pr(>F) 1 16 2 3 3 5 . 1 2 12 1 0 9 1 . 3 4 1243.7 3.4189 0.04373 ∗ −−− S i g n i f . c o d e s : 0 ∗∗∗ 0 . 0 0 1 ∗∗ 0 . 0 1 ∗ 0 . 0 5 . 0.1 1 d. Notice F-statistic is 3.4189 and the p-value is 0.04373. So there is a lack of ﬁt. e. Here is the R code and output. The estimate of pure error variance is 90.94. > d o s e s=unique ( s...
View Full Document

## This homework help was uploaded on 03/28/2014 for the course STAT 425 at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online