R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("MPV-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('MPV') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "cement" > > ### * cement > > flush(stderr()); flush(stdout()) > > ### Name: cement > ### Title: Cement Data > ### Aliases: cement > ### Keywords: datasets > > ### ** Examples > > data(cement) > pairs(cement) > > > > cleanEx(); ..nameEx <- "p11.12" > > ### * p11.12 > > flush(stderr()); flush(stdout()) > > ### Name: p11.12 > ### Title: Data For Problem 11-12 > ### Aliases: p11.12 > ### Keywords: datasets > > ### ** Examples > > data(p11.12) > attach(p11.12) > plot(cost~x) > detach(p11.12) > > > > cleanEx(); ..nameEx <- "p11.15" > > ### * p11.15 > > flush(stderr()); flush(stdout()) > > ### Name: p11.15 > ### Title: Data set for Problem 11-15 > ### Aliases: p11.15 > ### Keywords: datasets > > ### ** Examples > > data(p11.15) > plot(p11.15) > attach(p11.15) > lines(lowess(x,y)) > detach(p11.15) > > > > cleanEx(); ..nameEx <- "p12.11" > > ### * p12.11 > > flush(stderr()); flush(stdout()) > > ### Name: p12.11 > ### Title: Data Set for Problem 12-11 > ### Aliases: p12.11 > ### Keywords: datasets > > ### ** Examples > > data(p12.11) > plot(p12.11) > lines(lowess(p12.11)) > > > > cleanEx(); ..nameEx <- "p12.12" > > ### * p12.12 > > flush(stderr()); flush(stdout()) > > ### Name: p12.12 > ### Title: Data Set for Problem 12-12 > ### Aliases: p12.12 > ### Keywords: datasets > > ### ** Examples > > data(p12.12) > attach(p12.12) > # fitting the linearized model > logy.lm <- lm(I(log(y))~I(log(x1))+I(log(x2))) > summary(logy.lm) Call: lm(formula = I(log(y)) ~ I(log(x1)) + I(log(x2))) Residuals: Min 1Q Median 3Q Max -0.32083 -0.07250 -0.02308 0.07307 0.31541 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.05442 0.56704 -0.096 0.925 I(log(x1)) 0.76210 0.08146 9.355 1.19e-07 *** I(log(x2)) 0.21289 0.12996 1.638 0.122 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1568 on 15 degrees of freedom Multiple R-Squared: 0.8574, Adjusted R-squared: 0.8384 F-statistic: 45.1 on 2 and 15 DF, p-value: 4.523e-07 > plot(logy.lm, which=1) # checking the residuals > # fitting the nonlinear model > library(nls) # nonlinear regression library Warning: package 'nls' has been merged into 'stats' > y.nls <- nls(y ~ theta1*I(x1^theta2)*I(x2^theta3), start=list(theta1=.95, + theta2=.76, theta3=.21)) > summary(y.nls) Formula: y ~ theta1 * I(x1^theta2) * I(x2^theta3) Parameters: Estimate Std. Error t value Pr(>|t|) theta1 0.87027 0.39437 2.207 0.0433 * theta2 0.78324 0.08125 9.639 8.08e-08 *** theta3 0.22713 0.10068 2.256 0.0394 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.8446 on 15 degrees of freedom Correlation of Parameter Estimates: theta1 theta2 theta2 -0.2781 theta3 -0.9586 5.687e-09 > plot(resid(y.nls)~fitted(y.nls)) # checking the residuals > > > > cleanEx(); ..nameEx <- "p12.8" > > ### * p12.8 > > flush(stderr()); flush(stdout()) > > ### Name: p12.8 > ### Title: Data Set for Problem 12-8 > ### Aliases: p12.8 > ### Keywords: datasets > > ### ** Examples > > data(p12.8) > > > > cleanEx(); ..nameEx <- "p13.1" > > ### * p13.1 > > flush(stderr()); flush(stdout()) > > ### Name: p13.1 > ### Title: Data Set for Problem 13-1 > ### Aliases: p13.1 > ### Keywords: datasets > > ### ** Examples > > data(p13.1) > > > > cleanEx(); ..nameEx <- "p13.16" > > ### * p13.16 > > flush(stderr()); flush(stdout()) > > ### Name: p13.16 > ### Title: Data Set for Problem 13-16 > ### Aliases: p13.16 > ### Keywords: datasets > > ### ** Examples > > data(p13.16) > > > > cleanEx(); ..nameEx <- "p13.2" > > ### * p13.2 > > flush(stderr()); flush(stdout()) > > ### Name: p13.2 > ### Title: Data Set for Problem 13-2 > ### Aliases: p13.2 > ### Keywords: datasets > > ### ** Examples > > data(p13.2) > > > > cleanEx(); ..nameEx <- "p13.20" > > ### * p13.20 > > flush(stderr()); flush(stdout()) > > ### Name: p13.20 > ### Title: Data Set for Problem 13-20 > ### Aliases: p13.20 > ### Keywords: datasets > > ### ** Examples > > data(p13.20) > > > > cleanEx(); ..nameEx <- "p13.3" > > ### * p13.3 > > flush(stderr()); flush(stdout()) > > ### Name: p13.3 > ### Title: Data Set for Problem 13-3 > ### Aliases: p13.3 > ### Keywords: datasets > > ### ** Examples > > data(p13.3) > > > > cleanEx(); ..nameEx <- "p13.4" > > ### * p13.4 > > flush(stderr()); flush(stdout()) > > ### Name: p13.4 > ### Title: Data Set for Problem 13-4 > ### Aliases: p13.4 > ### Keywords: datasets > > ### ** Examples > > data(p13.4) > > > > cleanEx(); ..nameEx <- "p13.5" > > ### * p13.5 > > flush(stderr()); flush(stdout()) > > ### Name: p13.5 > ### Title: Data Set for Problem 13-5 > ### Aliases: p13.5 > ### Keywords: datasets > > ### ** Examples > > data(p13.5) > > > > cleanEx(); ..nameEx <- "p13.6" > > ### * p13.6 > > flush(stderr()); flush(stdout()) > > ### Name: p13.6 > ### Title: Data Set for Problem 13-6 > ### Aliases: p13.6 > ### Keywords: datasets > > ### ** Examples > > data(p13.6) > > > > cleanEx(); ..nameEx <- "p13.7" > > ### * p13.7 > > flush(stderr()); flush(stdout()) > > ### Name: p13.7 > ### Title: Data Set for Problem 13-7 > ### Aliases: p13.7 > ### Keywords: datasets > > ### ** Examples > > data(p13.7) > > > > cleanEx(); ..nameEx <- "p14.1" > > ### * p14.1 > > flush(stderr()); flush(stdout()) > > ### Name: p14.1 > ### Title: Data Set for Problem 14-1 > ### Aliases: p14.1 > ### Keywords: datasets > > ### ** Examples > > data(p14.1) > > > > cleanEx(); ..nameEx <- "p14.2" > > ### * p14.2 > > flush(stderr()); flush(stdout()) > > ### Name: p14.2 > ### Title: Data Set for Problem 14-2 > ### Aliases: p14.2 > ### Keywords: datasets > > ### ** Examples > > data(p14.2) > > > > cleanEx(); ..nameEx <- "p15.4" > > ### * p15.4 > > flush(stderr()); flush(stdout()) > > ### Name: p15.4 > ### Title: Data Set for Problem 15-4 > ### Aliases: p15.4 > ### Keywords: datasets > > ### ** Examples > > data(p15.4) > > > > cleanEx(); ..nameEx <- "p2.10" > > ### * p2.10 > > flush(stderr()); flush(stdout()) > > ### Name: p2.10 > ### Title: Data Set for Problem 2-10 > ### Aliases: p2.10 > ### Keywords: datasets > > ### ** Examples > > data(p2.10) > attach(p2.10) > cor.test(weight, sysbp, method="pearson") # tests rho=0 Pearson's product-moment correlation data: weight and sysbp t = 5.9786, df = 24, p-value = 3.591e-06 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.5513214 0.8932215 sample estimates: cor 0.7734903 > # and computes 95 > # using Fisher's Z-transform > > > > cleanEx(); ..nameEx <- "p2.12" > > ### * p2.12 > > flush(stderr()); flush(stdout()) > > ### Name: p2.12 > ### Title: Data Set for Problem 2-12 > ### Aliases: p2.12 > ### Keywords: datasets > > ### ** Examples > > data(p2.12) > attach(p2.12) > usage.lm <- lm(usage ~ temp) > summary(usage.lm) Call: lm(formula = usage ~ temp) Residuals: Min 1Q Median 3Q Max -2.5629 -1.2581 -0.2550 0.8681 4.0581 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.33209 1.67005 -3.792 0.00353 ** temp 9.20847 0.03382 272.255 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.946 on 10 degrees of freedom Multiple R-Squared: 0.9999, Adjusted R-squared: 0.9999 F-statistic: 7.412e+04 on 1 and 10 DF, p-value: < 2.2e-16 > predict(usage.lm, newdata=data.frame(temp=58), interval="prediction") fit lwr upr [1,] 527.759 523.1644 532.3537 > detach(p2.12) > > > > cleanEx(); ..nameEx <- "p2.13" > > ### * p2.13 > > flush(stderr()); flush(stdout()) > > ### Name: p2.13 > ### Title: Data Set for Problem 2-13 > ### Aliases: p2.13 > ### Keywords: datasets > > ### ** Examples > > data(p2.13) > attach(p2.13) > plot(days~index, ylim=c(-20,130)) > ozone.lm <- lm(days ~ index) > summary(ozone.lm) Call: lm(formula = days ~ index) Residuals: Min 1Q Median 3Q Max -48.252 -21.947 -2.305 26.979 48.008 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 183.596 214.359 0.856 0.406 index -7.404 12.351 -0.599 0.558 Residual standard error: 31.2 on 14 degrees of freedom Multiple R-Squared: 0.02502, Adjusted R-squared: -0.04462 F-statistic: 0.3593 on 1 and 14 DF, p-value: 0.5585 > # plots of confidence and prediction intervals: > ozone.conf <- predict(ozone.lm, interval="confidence") > lines(sort(index), ozone.conf[order(index),2], col="red") > lines(sort(index), ozone.conf[order(index),3], col="red") > ozone.pred <- predict(ozone.lm, interval="prediction") > lines(sort(index), ozone.pred[order(index),2], col="blue") > lines(sort(index), ozone.pred[order(index),3], col="blue") > detach(p2.13) > > > > cleanEx(); ..nameEx <- "p2.14" > > ### * p2.14 > > flush(stderr()); flush(stdout()) > > ### Name: p2.14 > ### Title: Data Set for Problem 2-14 > ### Aliases: p2.14 > ### Keywords: datasets > > ### ** Examples > > data(p2.14) > attach(p2.14) > plot(p2.14, pch=16, ylim=c(0,1)) > visc.lm <- lm(visc ~ ratio) > summary(visc.lm) Call: lm(formula = visc ~ ratio) Residuals: Min 1Q Median 3Q Max -0.20464 -0.10634 0.02196 0.08527 0.20643 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.6714 0.1595 4.209 0.00563 ** ratio -0.2964 0.2314 -1.281 0.24754 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.15 on 6 degrees of freedom Multiple R-Squared: 0.2147, Adjusted R-squared: 0.08382 F-statistic: 1.64 on 1 and 6 DF, p-value: 0.2475 > visc.conf <- predict(visc.lm, interval="confidence") > lines(ratio, visc.conf[,2], col="red") > lines(ratio, visc.conf[,3], col="red") > visc.pred <- predict(visc.lm, interval="prediction") > lines(ratio, visc.pred[,2], col="blue") > lines(ratio, visc.pred[,3], col="blue") > detach(p2.14) > > > > cleanEx(); ..nameEx <- "p2.15" > > ### * p2.15 > > flush(stderr()); flush(stdout()) > > ### Name: p2.15 > ### Title: Data Set for Problem 2-15 > ### Aliases: p2.15 > ### Keywords: datasets > > ### ** Examples > > data(p2.15) > attach(p2.15) > plot(visc ~ temp, pch=16) > visc.lm <- lm(visc ~ temp) > plot(visc.lm, which=1) > detach(p2.15) > > > > cleanEx(); ..nameEx <- "p2.16" > > ### * p2.16 > > flush(stderr()); flush(stdout()) > > ### Name: p2.16 > ### Title: Data Set for Problem 2-16 > ### Aliases: p2.16 > ### Keywords: datasets > > ### ** Examples > > data(p2.16) > attach(p2.16) > plot(pressure ~ volume, pch=16) > pressure.lm <- lm(pressure ~ volume) > plot(pressure.lm, which=1) > summary(pressure.lm) Call: lm(formula = pressure ~ volume) Residuals: Min 1Q Median 3Q Max -4.3276 -0.9227 0.0773 1.2676 2.9577 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2.907e+02 1.355e+00 -214.6 <2e-16 *** volume 2.346e+00 4.007e-04 5855.4 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.741 on 31 degrees of freedom Multiple R-Squared: 1, Adjusted R-squared: 1 F-statistic: 3.429e+07 on 1 and 31 DF, p-value: < 2.2e-16 > detach(p2.16) > > > > cleanEx(); ..nameEx <- "p2.7" > > ### * p2.7 > > flush(stderr()); flush(stdout()) > > ### Name: p2.7 > ### Title: Data Set for Problem 2-7 > ### Aliases: p2.7 > ### Keywords: datasets > > ### ** Examples > > data(p2.7) > attach(p2.7) > purity.lm <- lm(purity ~ hydro) > summary(purity.lm) Call: lm(formula = purity ~ hydro) Residuals: Min 1Q Median 3Q Max -4.6724 -3.2113 -0.0626 2.5783 7.3037 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 77.863 4.199 18.544 3.54e-13 *** hydro 11.801 3.485 3.386 0.00329 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.597 on 18 degrees of freedom Multiple R-Squared: 0.3891, Adjusted R-squared: 0.3552 F-statistic: 11.47 on 1 and 18 DF, p-value: 0.003291 > # confidence interval for mean purity at 1 > predict(purity.lm,newdata=data.frame(hydro = 1.00),interval="confidence") fit lwr upr [1,] 89.66431 87.51017 91.81845 > detach(p2.7) > > > > cleanEx(); ..nameEx <- "p2.9" > > ### * p2.9 > > flush(stderr()); flush(stdout()) > > ### Name: p2.9 > ### Title: Data Set for Problem 2-9 > ### Aliases: p2.9 > ### Keywords: datasets > > ### ** Examples > > data(p2.9) > > > > cleanEx(); ..nameEx <- "p4.18" > > ### * p4.18 > > flush(stderr()); flush(stdout()) > > ### Name: p4.18 > ### Title: Data Set for Problem 4-18 > ### Aliases: p4.18 > ### Keywords: datasets > > ### ** Examples > > data(p4.18) > y.lm <- lm(y ~ x1 + x2 + x3, data=p4.18) > summary(y.lm) Call: lm(formula = y ~ x1 + x2 + x3, data = p4.18) Residuals: Min 1Q Median 3Q Max -9.089 -4.075 -2.075 2.557 18.293 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.075 2.493 12.864 4.25e-07 *** x1 15.236 3.398 4.484 0.00152 ** x2 -4.059 3.222 -1.260 0.23941 x3 -4.809 3.222 -1.493 0.16973 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.79 on 9 degrees of freedom Multiple R-Squared: 0.692, Adjusted R-squared: 0.5893 F-statistic: 6.739 on 3 and 9 DF, p-value: 0.01118 > y.lm <- lm(y ~ x1, data=p4.18) > > > > cleanEx(); ..nameEx <- "p4.19" > > ### * p4.19 > > flush(stderr()); flush(stdout()) > > ### Name: p4.19 > ### Title: Data Set for Problem 4-19 > ### Aliases: p4.19 > ### Keywords: datasets > > ### ** Examples > > data(p4.19) > attach(p4.19) > y.lm <- lm(y ~ x1 + x2 + x3) > summary(y.lm) Call: lm(formula = y ~ x1 + x2 + x3) Residuals: Min 1Q Median 3Q Max -17.518 -8.768 -1.143 7.857 20.232 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 134.143 3.406 39.382 2.66e-12 *** x1 16.875 4.506 3.745 0.00382 ** x2 16.125 4.506 3.579 0.00502 ** x3 10.625 4.506 2.358 0.04009 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 12.74 on 10 degrees of freedom Multiple R-Squared: 0.7641, Adjusted R-squared: 0.6933 F-statistic: 10.8 on 3 and 10 DF, p-value: 0.001772 > plot(y.lm, which=1) > y.lm <- lm(y ~ x1) > detach(p4.19) > > > > cleanEx(); ..nameEx <- "p4.20" > > ### * p4.20 > > flush(stderr()); flush(stdout()) > > ### Name: p4.20 > ### Title: Data Set for Problem 4-20 > ### Aliases: p4.20 > ### Keywords: datasets > > ### ** Examples > > data(p4.20) > y.lm <- lm(y ~ acidtemp, data=p4.20) > summary(y.lm) Call: lm(formula = y ~ acidtemp, data = p4.20) Residuals: Min 1Q Median 3Q Max -18.085 -6.762 1.038 6.502 18.661 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 55.5409 10.0682 5.516 1.13e-05 *** acidtemp 0.7454 0.2188 3.407 0.00232 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.72 on 24 degrees of freedom Multiple R-Squared: 0.326, Adjusted R-squared: 0.2979 F-statistic: 11.61 on 1 and 24 DF, p-value: 0.002319 > > > > cleanEx(); ..nameEx <- "p5.1" > > ### * p5.1 > > flush(stderr()); flush(stdout()) > > ### Name: p5.1 > ### Title: Data Set for Problem 5-1 > ### Aliases: p5.1 > ### Keywords: datasets > > ### ** Examples > > data(p5.1) > plot(p5.1) > > > > cleanEx(); ..nameEx <- "p5.10" > > ### * p5.10 > > flush(stderr()); flush(stdout()) > > ### Name: p5.10 > ### Title: Data Set for Problem 5-10 > ### Aliases: p5.10 > ### Keywords: datasets > > ### ** Examples > > data(p5.10) > attach(p5.10) > y.lm <- lm(ybar.i ~ x1 + x2 + x3) > plot(y.lm, which=1) > detach(p5.10) > > > > cleanEx(); ..nameEx <- "p5.11" > > ### * p5.11 > > flush(stderr()); flush(stdout()) > > ### Name: p5.11 > ### Title: Data Set for Problem 5-11 > ### Aliases: p5.11 > ### Keywords: datasets > > ### ** Examples > > data(p5.11) > attach(p5.11) > ybar.i <- apply(p5.11[,5:7], 1, mean) > sd.i <- apply(p5.11[,5:7], 1, sd) > y.lm <- lm(ybar.i ~ x1 + x2 + x3 + x4) > plot(y.lm, which=1) > detach(p5.11) > > > > cleanEx(); ..nameEx <- "p5.2" > > ### * p5.2 > > flush(stderr()); flush(stdout()) > > ### Name: p5.2 > ### Title: Data Set for Problem 5-2 > ### Aliases: p5.2 > ### Keywords: datasets > > ### ** Examples > > data(p5.2) > plot(p5.2) > > > > cleanEx(); ..nameEx <- "p5.3" > > ### * p5.3 > > flush(stderr()); flush(stdout()) > > ### Name: p5.3 > ### Title: Data Set for Problem 5-3 > ### Aliases: p5.3 > ### Keywords: datasets > > ### ** Examples > > data(p5.3) > plot(bact~min, data=p5.3) > > > > cleanEx(); ..nameEx <- "p5.4" > > ### * p5.4 > > flush(stderr()); flush(stdout()) > > ### Name: p5.4 > ### Title: Data Set for Problem 5-4 > ### Aliases: p5.4 > ### Keywords: datasets > > ### ** Examples > > data(p5.4) > plot(y ~ x, data=p5.4) > > > > cleanEx(); ..nameEx <- "p5.5" > > ### * p5.5 > > flush(stderr()); flush(stdout()) > > ### Name: p5.5 > ### Title: Data Set for Problem 5-5 > ### Aliases: p5.5 > ### Keywords: datasets > > ### ** Examples > > data(p5.5) > defects.lm <- lm(defects~weeks, data=p5.5) > plot(defects.lm, which=1) > > > > cleanEx(); ..nameEx <- "p7.1" > > ### * p7.1 > > flush(stderr()); flush(stdout()) > > ### Name: p7.1 > ### Title: Data Set for Problem 7-1 > ### Aliases: p7.1 > ### Keywords: datasets > > ### ** Examples > > data(p7.1) > attach(p7.1) > x2 <- x^2 > detach(p7.1) > > > > cleanEx(); ..nameEx <- "p7.11" > > ### * p7.11 > > flush(stderr()); flush(stdout()) > > ### Name: p7.11 > ### Title: Data Set for Problem 7-11 > ### Aliases: p7.11 > ### Keywords: datasets > > ### ** Examples > > data(p7.11) > plot(y ~ x, data=p7.11) > > > > cleanEx(); ..nameEx <- "p7.15" > > ### * p7.15 > > flush(stderr()); flush(stdout()) > > ### Name: p7.15 > ### Title: Data Set for Problem 7-15 > ### Aliases: p7.15 > ### Keywords: datasets > > ### ** Examples > > data(p7.15) > y.lm <- lm(y ~ x, data=p7.15) > plot(y ~ x, data=p7.15) > abline(coef(y.lm)) > plot(y.lm, which=1) > > > > cleanEx(); ..nameEx <- "p7.16" > > ### * p7.16 > > flush(stderr()); flush(stdout()) > > ### Name: p7.16 > ### Title: Data Set for Problem 7-16 > ### Aliases: p7.16 > ### Keywords: datasets > > ### ** Examples > > data(p7.16) > pairs(p7.16) > > > > cleanEx(); ..nameEx <- "p7.19" > > ### * p7.19 > > flush(stderr()); flush(stdout()) > > ### Name: p7.19 > ### Title: Data Set for Problem 7-19 > ### Aliases: p7.19 > ### Keywords: datasets > > ### ** Examples > > data(p7.19) > y.lm <- lm(y ~ x + I(x^2), data=p7.19) > summary(y.lm) Call: lm(formula = y ~ x + I(x^2), data = p7.19) Residuals: Min 1Q Median 3Q Max -0.27575 -0.06414 -0.03741 0.16051 0.27187 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.709e+03 2.448e+02 -6.984 0.000215 *** x 2.023e+00 2.798e-01 7.230 0.000173 *** I(x^2) -5.929e-04 7.994e-05 -7.417 0.000147 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2101 on 7 degrees of freedom Multiple R-Squared: 0.9885, Adjusted R-squared: 0.9852 F-statistic: 300.1 on 2 and 7 DF, p-value: 1.645e-07 > > > > cleanEx(); ..nameEx <- "p7.2" > > ### * p7.2 > > flush(stderr()); flush(stdout()) > > ### Name: p7.2 > ### Title: Data Set for Problem 7-2 > ### Aliases: p7.2 > ### Keywords: datasets > > ### ** Examples > > data(p7.2) > y.lm <- lm(y ~ x + I(x^2), data=p7.2) > summary(y.lm) Call: lm(formula = y ~ x + I(x^2), data = p7.2) Residuals: Min 1Q Median 3Q Max -0.005364 -0.002727 0.001045 0.002409 0.003273 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.633000 0.004196 389.2 < 2e-16 *** x -1.232182 0.007010 -175.8 5.09e-14 *** I(x^2) 1.494545 0.002484 601.6 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.003568 on 7 degrees of freedom Multiple R-Squared: 1, Adjusted R-squared: 1 F-statistic: 1.859e+06 on 2 and 7 DF, p-value: < 2.2e-16 > plot(y ~ x, data=p7.2) > > > > cleanEx(); ..nameEx <- "p7.4" > > ### * p7.4 > > flush(stderr()); flush(stdout()) > > ### Name: p7.4 > ### Title: Data Set for Problem 7-4 > ### Aliases: p7.4 > ### Keywords: datasets > > ### ** Examples > > data(p7.4) > y.lm <- lm(y ~ x + I(x^2), data = p7.4) > summary(y.lm) Call: lm(formula = y ~ x + I(x^2), data = p7.4) Residuals: Min 1Q Median 3Q Max -4.5729 0.1344 0.4641 0.7315 0.8495 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.4595 14.6343 -0.305 0.7675 x 1.3837 5.4971 0.252 0.8069 I(x^2) 1.4670 0.4936 2.972 0.0156 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.657 on 9 degrees of freedom Multiple R-Squared: 0.9957, Adjusted R-squared: 0.9948 F-statistic: 1045 on 2 and 9 DF, p-value: 2.213e-11 > > > > cleanEx(); ..nameEx <- "p7.6" > > ### * p7.6 > > flush(stderr()); flush(stdout()) > > ### Name: p7.6 > ### Title: Data Set for Problem 7-6 > ### Aliases: p7.6 > ### Keywords: datasets > > ### ** Examples > > data(p7.6) > y.lm <- lm(y ~ x1 + I(x1^2) + x2 + I(x2^2) + I(x1*x2), data=p7.6) > summary(y.lm) Call: lm(formula = y ~ x1 + I(x1^2) + x2 + I(x2^2) + I(x1 * x2), data = p7.6) Residuals: Min 1Q Median 3Q Max -0.755477 -0.222377 -0.003424 0.260242 0.964523 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3025.3186 2045.7464 1.479 0.1897 x1 -194.2729 132.0643 -1.471 0.1917 I(x1^2) 3.6259 2.2098 1.641 0.1519 x2 -6.0507 20.6063 -0.294 0.7789 I(x2^2) 1.1542 0.3237 3.565 0.0118 * I(x1 * x2) -1.3317 0.8962 -1.486 0.1878 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6194 on 6 degrees of freedom Multiple R-Squared: 0.9933, Adjusted R-squared: 0.9877 F-statistic: 177.2 on 5 and 6 DF, p-value: 1.983e-06 > > > > cleanEx(); ..nameEx <- "p8.11" > > ### * p8.11 > > flush(stderr()); flush(stdout()) > > ### Name: p8.11 > ### Title: Data Set for Problem 8-11 > ### Aliases: p8.11 > ### Keywords: datasets > > ### ** Examples > > data(p8.11) > y.lm <- lm(y ~ percent, data=p8.11) > model.matrix(y.lm) (Intercept) percent 1 1 15 2 1 15 3 1 15 4 1 15 5 1 15 6 1 20 7 1 20 8 1 20 9 1 20 10 1 20 11 1 25 12 1 25 13 1 25 14 1 25 15 1 25 16 1 30 17 1 30 18 1 30 19 1 30 20 1 30 21 1 35 22 1 35 23 1 35 24 1 35 25 1 35 attr(,"assign") [1] 0 1 > > > > cleanEx(); ..nameEx <- "p8.3" > > ### * p8.3 > > flush(stderr()); flush(stdout()) > > ### Name: p8.3 > ### Title: Data Set for Problem 8-3 > ### Aliases: p8.3 > ### Keywords: datasets > > ### ** Examples > > data(p8.3) > pairs(p8.3) > > > > cleanEx(); ..nameEx <- "p9.10" > > ### * p9.10 > > flush(stderr()); flush(stdout()) > > ### Name: p9.10 > ### Title: Data Set for Problem 9-10 > ### Aliases: p9.10 > ### Keywords: datasets > > ### ** Examples > > data(p9.10) > pairs(p9.10) > > > > cleanEx(); ..nameEx <- "quadline" > > ### * quadline > > flush(stderr()); flush(stdout()) > > ### Name: quadline > ### Title: Quadratic Overlay > ### Aliases: quadline > ### Keywords: models > > ### ** Examples > > data(p4.18) > attach(p4.18) > y.lm <- lm(y ~ x1 + I(x1^2)) > plot(x1, y) > quadline(y.lm) > detach(p4.18) > > > > cleanEx(); ..nameEx <- "softdrink" > > ### * softdrink > > flush(stderr()); flush(stdout()) > > ### Name: softdrink > ### Title: Softdrink Data > ### Aliases: softdrink > ### Keywords: datasets > > ### ** Examples > > data(softdrink) > > > > cleanEx(); ..nameEx <- "solar" > > ### * solar > > flush(stderr()); flush(stdout()) > > ### Name: solar > ### Title: Solar Data > ### Aliases: solar > ### Keywords: datasets > > ### ** Examples > > data(solar) > > > > cleanEx(); ..nameEx <- "stackloss" > > ### * stackloss > > flush(stderr()); flush(stdout()) > > ### Name: stackloss > ### Title: Stackloss Data > ### Aliases: stackloss > ### Keywords: datasets > > ### ** Examples > > data(stackloss) > > > > cleanEx(); ..nameEx <- "table.b1" > > ### * table.b1 > > flush(stderr()); flush(stdout()) > > ### Name: table.b1 > ### Title: Table B1 > ### Aliases: table.b1 > ### Keywords: datasets > > ### ** Examples > > data(table.b1) > attach(table.b1) > y.lm <- lm(y ~ x2 + x7 + x8) > summary(y.lm) Call: lm(formula = y ~ x2 + x7 + x8) Residuals: Min 1Q Median 3Q Max -3.0370 -0.7129 -0.2043 1.1101 3.7049 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.808372 7.900859 -0.229 0.820899 x2 0.003598 0.000695 5.177 2.66e-05 *** x7 0.193960 0.088233 2.198 0.037815 * x8 -0.004816 0.001277 -3.771 0.000938 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.706 on 24 degrees of freedom Multiple R-Squared: 0.7863, Adjusted R-squared: 0.7596 F-statistic: 29.44 on 3 and 24 DF, p-value: 3.273e-08 > # over-all F-test: > y.null <- lm(y ~ 1) > anova(y.null, y.lm) Analysis of Variance Table Model 1: y ~ 1 Model 2: y ~ x2 + x7 + x8 Res.Df RSS Df Sum of Sq F Pr(>F) 1 27 326.96 2 24 69.87 3 257.09 29.437 3.273e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # partial F-test for x7: > y7.lm <- lm(y ~ x2 + x8) > anova(y7.lm, y.lm) Analysis of Variance Table Model 1: y ~ x2 + x8 Model 2: y ~ x2 + x7 + x8 Res.Df RSS Df Sum of Sq F Pr(>F) 1 25 83.938 2 24 69.870 1 14.068 4.8324 0.03782 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > detach(table.b1) > > > > cleanEx(); ..nameEx <- "table.b10" > > ### * table.b10 > > flush(stderr()); flush(stdout()) > > ### Name: table.b10 > ### Title: Table B10 > ### Aliases: table.b10 > ### Keywords: datasets > > ### ** Examples > > data(table.b10) > attach(table.b10) > y.lm <- lm(y ~ x1 + x2) > summary(y.lm) Call: lm(formula = y ~ x1 + x2) Residuals: Min 1Q Median 3Q Max -0.22179 -0.18102 -0.08439 0.09111 0.99908 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.679439 0.143532 4.734 3.20e-05 *** x1 1.407331 0.196925 7.147 1.81e-08 *** x2 -0.015629 0.001428 -10.948 3.67e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2593 on 37 degrees of freedom Multiple R-Squared: 0.822, Adjusted R-squared: 0.8124 F-statistic: 85.46 on 2 and 37 DF, p-value: 1.351e-14 > detach(table.b10) > > > > cleanEx(); ..nameEx <- "table.b11" > > ### * table.b11 > > flush(stderr()); flush(stdout()) > > ### Name: table.b11 > ### Title: Table B11 > ### Aliases: table.b11 > ### Keywords: datasets > > ### ** Examples > > data(table.b11) > attach(table.b11) > Quality.lm <- lm(Quality ~ Clarity + Aroma + Body + Flavor + Oakiness + + factor(Region)) > summary(Quality.lm) Call: lm(formula = Quality ~ Clarity + Aroma + Body + Flavor + Oakiness + factor(Region)) Residuals: Min 1Q Median 3Q Max -1.80824 -0.58413 -0.02081 0.48627 1.70909 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.81437 1.96944 3.968 0.000417 *** Clarity 0.01705 1.45627 0.012 0.990736 Aroma 0.08901 0.25250 0.353 0.726908 Body 0.07967 0.26772 0.298 0.768062 Flavor 1.11723 0.24026 4.650 6.25e-05 *** Oakiness -0.34644 0.23301 -1.487 0.147503 factor(Region)2 -1.51285 0.39227 -3.857 0.000565 *** factor(Region)3 0.97259 0.51017 1.906 0.066218 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.9154 on 30 degrees of freedom Multiple R-Squared: 0.8376, Adjusted R-squared: 0.7997 F-statistic: 22.1 on 7 and 30 DF, p-value: 3.295e-10 > detach(table.b11) > > > > cleanEx(); ..nameEx <- "table.b12" > > ### * table.b12 > > flush(stderr()); flush(stdout()) > > ### Name: table.b12 > ### Title: Table B12 > ### Aliases: table.b12 > ### Keywords: datasets > > ### ** Examples > > data(table.b12) > > > > cleanEx(); ..nameEx <- "table.b13" > > ### * table.b13 > > flush(stderr()); flush(stdout()) > > ### Name: table.b13 > ### Title: Table B13 > ### Aliases: table.b13 > ### Keywords: datasets > > ### ** Examples > > data(table.b13) > > > > cleanEx(); ..nameEx <- "table.b14" > > ### * table.b14 > > flush(stderr()); flush(stdout()) > > ### Name: table.b14 > ### Title: Table B14 > ### Aliases: table.b14 > ### Keywords: datasets > > ### ** Examples > > data(table.b14) > y.lm <- lm(y ~ x1 + x2 + x3 + x4, data=table.b14) > plot(y.lm, which=1) > > > > cleanEx(); ..nameEx <- "table.b2" > > ### * table.b2 > > flush(stderr()); flush(stdout()) > > ### Name: table.b2 > ### Title: Table B2 > ### Aliases: table.b2 > ### Keywords: datasets > > ### ** Examples > > data(table.b2) > > > > cleanEx(); ..nameEx <- "table.b3" > > ### * table.b3 > > flush(stderr()); flush(stdout()) > > ### Name: table.b3 > ### Title: Table B3 > ### Aliases: table.b3 > ### Keywords: datasets > > ### ** Examples > > data(table.b3) > attach(table.b3) > y.lm <- lm(y ~ x1 + x6) > summary(y.lm) Call: lm(formula = y ~ x1 + x6) Residuals: Min 1Q Median 3Q Max -7.0623 -1.6687 -0.3628 1.6221 6.2305 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.884551 1.535408 21.417 < 2e-16 *** x1 -0.053148 0.006137 -8.660 1.55e-09 *** x6 0.959223 0.670277 1.431 0.163 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.013 on 29 degrees of freedom Multiple R-Squared: 0.7873, Adjusted R-squared: 0.7726 F-statistic: 53.67 on 2 and 29 DF, p-value: 1.79e-10 > # testing for the significance of the regression: > y.null <- lm(y ~ 1) > anova(y.null, y.lm) Analysis of Variance Table Model 1: y ~ 1 Model 2: y ~ x1 + x6 Res.Df RSS Df Sum of Sq F Pr(>F) 1 31 1237.54 2 29 263.23 2 974.31 53.669 1.79e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # 95 > predict(y.lm, newdata=data.frame(x1=275, x6=2), interval="confidence") fit lwr upr [1,] 20.18739 18.87221 21.50257 > # 95 > predict(y.lm, newdata=data.frame(x1=275, x6=2), interval="prediction") fit lwr upr [1,] 20.18739 13.8867 26.48808 > detach(table.b3) > > > > cleanEx(); ..nameEx <- "table.b4" > > ### * table.b4 > > flush(stderr()); flush(stdout()) > > ### Name: table.b4 > ### Title: Table B4 > ### Aliases: table.b4 > ### Keywords: datasets > > ### ** Examples > > data(table.b4) > attach(table.b4) > y.lm <- lm(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9) > summary(y.lm) Call: lm(formula = y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9) Residuals: Min 1Q Median 3Q Max -3.71960 -1.95575 -0.04503 1.62733 4.25259 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 14.92765 5.91285 2.525 0.0243 * x1 1.92472 1.02990 1.869 0.0827 . x2 7.00053 4.30037 1.628 0.1258 x3 0.14918 0.49039 0.304 0.7654 x4 2.72281 4.35955 0.625 0.5423 x5 2.00668 1.37351 1.461 0.1661 x6 -0.41012 2.37854 -0.172 0.8656 x7 -1.40324 3.39554 -0.413 0.6857 x8 -0.03715 0.06672 -0.557 0.5865 x9 1.55945 1.93750 0.805 0.4343 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.949 on 14 degrees of freedom Multiple R-Squared: 0.8531, Adjusted R-squared: 0.7587 F-statistic: 9.037 on 9 and 14 DF, p-value: 0.0001850 > detach(table.b4) > > > > cleanEx(); ..nameEx <- "table.b5" > > ### * table.b5 > > flush(stderr()); flush(stdout()) > > ### Name: table.b5 > ### Title: Data Set for Table B5 > ### Aliases: table.b5 > ### Keywords: datasets > > ### ** Examples > > data(table.b5) > attach(table.b5) > y.lm <- lm(y ~ x6 + x7) > summary(y.lm) Call: lm(formula = y ~ x6 + x7) Residuals: Min 1Q Median 3Q Max -23.2035 -4.3713 0.2513 4.9339 21.9682 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.526460 3.610055 0.700 0.4908 x6 0.018522 0.002747 6.742 5.66e-07 *** x7 2.185753 0.972696 2.247 0.0341 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.924 on 24 degrees of freedom Multiple R-Squared: 0.6996, Adjusted R-squared: 0.6746 F-statistic: 27.95 on 2 and 24 DF, p-value: 5.391e-07 > detach(table.b5) > > > > cleanEx(); ..nameEx <- "table.b6" > > ### * table.b6 > > flush(stderr()); flush(stdout()) > > ### Name: table.b6 > ### Title: Data Set for Table B6 > ### Aliases: table.b6 > ### Keywords: datasets > > ### ** Examples > > data(table.b6) > # Partial Solution to Problem 3.9 > attach(table.b6) > y.lm <- lm(y ~ x1 + x4) > summary(y.lm) Call: lm(formula = y ~ x1 + x4) Residuals: Min 1Q Median 3Q Max -0.0009015 -0.0003526 -0.0001538 0.0003847 0.0010874 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.0048333 0.0008142 5.936 3.39e-06 *** x1 -0.3449837 0.0673963 -5.119 2.74e-05 *** x4 -0.0001430 0.0078151 -0.018 0.986 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.0005804 on 25 degrees of freedom Multiple R-Squared: 0.6636, Adjusted R-squared: 0.6367 F-statistic: 24.66 on 2 and 25 DF, p-value: 1.218e-06 > detach(table.b6) > > > > cleanEx(); ..nameEx <- "table.b7" > > ### * table.b7 > > flush(stderr()); flush(stdout()) > > ### Name: table.b7 > ### Title: Data Set for Table B7 > ### Aliases: table.b7 > ### Keywords: datasets > > ### ** Examples > > data(table.b7) > attach(table.b7) > # partial solution to Problem 3.11: > peanuts.lm <- lm(y ~ x1 + x2 + x3 + x4 + x5) > summary(peanuts.lm) Call: lm(formula = y ~ x1 + x2 + x3 + x4 + x5) Residuals: Min 1Q Median 3Q Max -12.250 -4.438 0.125 5.250 9.500 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.208e+01 1.889e+01 2.757 0.020218 * x1 5.556e-02 2.987e-02 1.860 0.092544 . x2 2.821e-01 5.761e-02 4.897 0.000625 *** x3 1.250e-01 4.033e-01 0.310 0.762949 x4 6.719e-18 2.016e-01 3.33e-17 1.000000 x5 -1.606e+01 1.456e+00 -11.035 6.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.065 on 10 degrees of freedom Multiple R-Squared: 0.9372, Adjusted R-squared: 0.9058 F-statistic: 29.86 on 5 and 10 DF, p-value: 1.055e-05 > detach(table.b7) > > > > cleanEx(); ..nameEx <- "table.b8" > > ### * table.b8 > > flush(stderr()); flush(stdout()) > > ### Name: table.b8 > ### Title: Table B8 > ### Aliases: table.b8 > ### Keywords: datasets > > ### ** Examples > > data(table.b8) > attach(table.b8) > clathrate.lm <- lm(y ~ x1 + x2) > summary(clathrate.lm) Call: lm(formula = y ~ x1 + x2) Residuals: Min 1Q Median 3Q Max -9.77163 -4.16561 0.08023 3.83228 8.33493 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.109e+01 1.669e+00 6.642 1.48e-07 *** x1 3.501e+02 3.968e+01 8.823 3.38e-10 *** x2 1.089e-01 9.983e-03 10.912 1.74e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.782 on 33 degrees of freedom Multiple R-Squared: 0.8415, Adjusted R-squared: 0.8319 F-statistic: 87.6 on 2 and 33 DF, p-value: 6.316e-14 > detach(table.b8) > > > > cleanEx(); ..nameEx <- "table.b9" > > ### * table.b9 > > flush(stderr()); flush(stdout()) > > ### Name: table.b9 > ### Title: Data Set for Table B9 > ### Aliases: table.b9 > ### Keywords: datasets > > ### ** Examples > > data(table.b9) > attach(table.b9) > # Partial Solution to Problem 3.13: > y.lm <- lm(y ~ x1 + x2 + x3 + x4) > summary(y.lm) Call: lm(formula = y ~ x1 + x2 + x3 + x4) Residuals: Min 1Q Median 3Q Max -9.9958 -3.3092 -0.2419 3.3924 10.5668 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.89453 4.32508 1.363 0.17828 x1 -0.47790 0.34002 -1.406 0.16530 x2 0.18271 0.01718 10.633 3.78e-15 *** x3 35.40284 11.09960 3.190 0.00232 ** x4 5.84391 2.90978 2.008 0.04935 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.014 on 57 degrees of freedom Multiple R-Squared: 0.6914, Adjusted R-squared: 0.6697 F-statistic: 31.92 on 4 and 57 DF, p-value: 5.818e-14 > detach(table.b9) > > > > ### *