Stat H2 Q5 - Q5| x=c(4:15 x 4 5 6 7 8 9 10 11 12 13 14 15...

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

View Full Document Right Arrow Icon
x=c(4:15) x 4 5 6 7 8 9 10 11 12 13 14 15 expy=2+3*x err1=rnorm(12,0,2) err1 -0.98871500 -0.22357350 -2.00908801 -2.74262063 -2.33928879 -1.48643320 -0.33429333 -0.03987824 -2.16864021 2.70928221 -0.77597516 -2.15923240 y1=expy+err1 y1 13.01129 16.77643 17.99091 20.25738 23.66071 27.51357 31.66571 34.96012 35.83136 43.70928 43.22402 44.84077 plot(x,y1) 4 6 8 10 12 14 15 20 25 30 35 40 45 x y1 out1=lm(y1~x) summary(out1) Call: lm(formula = y1 ~ x) Residuals: Min 1Q Median 3Q Max -2.6549 -1.8233 0.2388 1.0332 3.5971 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.140 1.749 0.652 0.529 x 3.025 0.173 17.483 7.96e-09 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.069 on 10 degrees of freedom Multiple R-squared: 0.9683, Adjusted R-squared: 0.9652 F-statistic: 305.7 on 1 and 10 DF, p-value: 7.957e-09 plot(fitted(out1),resid(out1)) err2=rnorm(12,0,2) err2 -0.35954328 -1.69828066 -1.83300025 -0.17839605 -0.09274711 2.90328830 -0.04615487 -1.35978487 -2.22583775 -1.00765433 2.69690293 0.20739667 y2=expy+err2
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.

This note was uploaded on 02/10/2012 for the course STAT 333 taught by Professor Rick during the Spring '11 term at Wisconsin Milwaukee.

Page1 / 6

Stat H2 Q5 - Q5| x=c(4:15 x 4 5 6 7 8 9 10 11 12 13 14 15...

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