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("dispmod-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('dispmod') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "glm.binomial.disp" > > ### * glm.binomial.disp > > flush(stderr()); flush(stdout()) > > ### Name: glm.binomial.disp > ### Title: Overdispersed binomial logit models. > ### Aliases: glm.binomial.disp > ### Keywords: models regression > > ### ** Examples > > data(orobanche) > attach(orobanche) > h <- factor(host) > v <- factor(variety, levels=c("O.a75", "O.a73")) > > mod <- glm(cbind(germinated, seeds-germinated) ~ h + v + h*v, family=binomial(logit)) > summary(mod) Call: glm(formula = cbind(germinated, seeds - germinated) ~ h + v + h * v, family = binomial(logit)) Deviance Residuals: Min 1Q Median 3Q Max -2.01617 -1.24398 0.05995 0.84695 2.12123 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.5582 0.1260 -4.429 9.46e-06 *** hCuke 1.3182 0.1775 7.428 1.10e-13 *** vO.a73 0.1459 0.2232 0.654 0.5132 hCuke:vO.a73 -0.7781 0.3064 -2.539 0.0111 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 98.719 on 20 degrees of freedom Residual deviance: 33.278 on 17 degrees of freedom AIC: 117.87 Number of Fisher Scoring iterations: 4 > > mod.disp <- glm.binomial.disp(mod) Binomial overdispersed logit model fitting... Iter. 1 phi: 0.02371848 Iter. 2 phi: 0.02487540 Iter. 3 phi: 0.02493477 Iter. 4 phi: 0.02493781 Iter. 5 phi: 0.02493797 Iter. 6 phi: 0.02493797 Converged after 6 iterations. Estimated dispersion parameter: 0.02493797 Call: glm(formula = cbind(germinated, seeds - germinated) ~ h + v + h * v, family = binomial(logit), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.90450 -0.85787 0.01759 0.76382 1.36185 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.53541 0.19374 -2.763 0.00572 ** hCuke 1.32979 0.27817 4.780 1.75e-06 *** vO.a73 0.07009 0.31146 0.225 0.82196 hCuke:vO.a73 -0.81956 0.43522 -1.883 0.05969 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 47.243 on 20 degrees of freedom Residual deviance: 18.442 on 17 degrees of freedom AIC: 65.578 Number of Fisher Scoring iterations: 4 > summary(mod.disp) Call: glm(formula = cbind(germinated, seeds - germinated) ~ h + v + h * v, family = binomial(logit), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.90450 -0.85787 0.01759 0.76382 1.36185 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.53541 0.19374 -2.763 0.00572 ** hCuke 1.32979 0.27817 4.780 1.75e-06 *** vO.a73 0.07009 0.31146 0.225 0.82196 hCuke:vO.a73 -0.81956 0.43522 -1.883 0.05969 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 47.243 on 20 degrees of freedom Residual deviance: 18.442 on 17 degrees of freedom AIC: 65.578 Number of Fisher Scoring iterations: 4 > mod.disp$dispersion [1] 0.02493797 > > > > cleanEx(); ..nameEx <- "glm.poisson.disp" > > ### * glm.poisson.disp > > flush(stderr()); flush(stdout()) > > ### Name: glm.poisson.disp > ### Title: Overdispersed Poisson log-linear models. > ### Aliases: glm.poisson.disp > ### Keywords: models regression > > ### ** Examples > > ##-- Salmonella TA98 data > > data(salmonellaTA98) > attach(salmonellaTA98) > log.x10 <- log(x+10) > mod <- glm(y ~ log.x10 + x, family=poisson(log)) > summary(mod) Call: glm(formula = y ~ log.x10 + x, family = poisson(log)) Deviance Residuals: Min 1Q Median 3Q Max -2.5173 -1.1731 -0.4032 0.7995 3.7041 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 2.1727730 0.2184269 9.947 < 2e-16 *** log.x10 0.3198250 0.0570014 5.611 2.01e-08 *** x -0.0010130 0.0002452 -4.131 3.61e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 78.358 on 17 degrees of freedom Residual deviance: 43.716 on 15 degrees of freedom AIC: 142.25 Number of Fisher Scoring iterations: 4 > > mod.disp <- glm.poisson.disp(mod) Poisson overdispersed log-linear model fitting... Iter. 1 sigma^2: 0.0717889 Iter. 2 sigma^2: 0.07180372 Iter. 3 sigma^2: 0.07180614 Iter. 4 sigma^2: 0.07180702 Iter. 5 sigma^2: 0.07180731 Iter. 6 sigma^2: 0.0718074 Iter. 7 sigma^2: 0.07180744 Iter. 8 sigma^2: 0.07180745 Iter. 9 sigma^2: 0.07180745 Iter. 10 sigma^2: 0.07180745 Converged after 10 iterations. Estimated dispersion parameter: 0.07180745 Call: glm(formula = y ~ log.x10 + x, family = poisson(log), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.4418 -0.6272 -0.2374 0.4564 1.9937 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 2.2030681 0.3635996 6.059 1.37e-09 *** log.x10 0.3109623 0.0990523 3.139 0.00169 ** x -0.0009741 0.0004371 -2.228 0.02585 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 25.313 on 17 degrees of freedom Residual deviance: 14.214 on 15 degrees of freedom AIC: 50.799 Number of Fisher Scoring iterations: 4 > summary(mod.disp) Call: glm(formula = y ~ log.x10 + x, family = poisson(log), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.4418 -0.6272 -0.2374 0.4564 1.9937 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 2.2030681 0.3635996 6.059 1.37e-09 *** log.x10 0.3109623 0.0990523 3.139 0.00169 ** x -0.0009741 0.0004371 -2.228 0.02585 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 25.313 on 17 degrees of freedom Residual deviance: 14.214 on 15 degrees of freedom AIC: 50.799 Number of Fisher Scoring iterations: 4 > mod.disp$dispersion [1] 0.07180745 > > # compute predictions on a grid of x-values... > x0 <- seq(min(x), max(x), length=50) > eta0 <- predict(mod, newdata=data.frame(log.x10=log(x0+10), x=x0), se=TRUE) > eta0.disp <- predict(mod.disp, newdata=data.frame(log.x10=log(x0+10), x=x0), se=TRUE) > # ... and plot the mean functions with variability bands > plot(x, y) > lines(x0, exp(eta0$fit)) > lines(x0, exp(eta0$fit+2*eta0$se), lty=2) > lines(x0, exp(eta0$fit-2*eta0$se), lty=2) > lines(x0, exp(eta0.disp$fit), col=2) > lines(x0, exp(eta0.disp$fit+2*eta0.disp$se), lty=2, col=2) > lines(x0, exp(eta0.disp$fit-2*eta0.disp$se), lty=2, col=2) > > ##-- Holford's data > > data(holford) > attach(holford) > > mod <- glm(incid ~ offset(log(pop)) + Age + Cohort, family=poisson(log)) > summary(mod) Call: glm(formula = incid ~ offset(log(pop)) + Age + Cohort, family = poisson(log)) Deviance Residuals: Min 1Q Median 3Q Max -3.2139 -1.2049 -0.1720 1.4619 3.6696 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -8.62551 0.10123 -85.208 < 2e-16 *** Age55-59 0.81903 0.02871 28.526 < 2e-16 *** Age60-64 1.55271 0.02790 55.655 < 2e-16 *** Age65-69 2.13322 0.02751 77.540 < 2e-16 *** Age70-74 2.68681 0.02803 95.844 < 2e-16 *** Age75-79 3.13410 0.02910 107.689 < 2e-16 *** Age80-84 3.45545 0.03143 109.930 < 2e-16 *** Cohort1860-64 0.36540 0.10901 3.352 0.000803 *** Cohort1865-69 0.52338 0.10221 5.120 3.05e-07 *** Cohort1870-74 0.77303 0.09976 7.749 9.25e-15 *** Cohort1875-79 1.00959 0.09883 10.216 < 2e-16 *** Cohort1880-84 1.15061 0.09832 11.702 < 2e-16 *** Cohort1885-89 1.30700 0.09803 13.333 < 2e-16 *** Cohort1890-94 1.50956 0.09856 15.317 < 2e-16 *** Cohort1895-99 1.55288 0.09882 15.713 < 2e-16 *** Cohort1900-04 1.59181 0.09932 16.027 < 2e-16 *** Cohort1905-09 1.46105 0.10074 14.503 < 2e-16 *** Cohort1910-14 1.36926 0.10396 13.171 < 2e-16 *** Cohort1915-19 1.23725 0.11616 10.651 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 35493.66 on 48 degrees of freedom Residual deviance: 127.38 on 30 degrees of freedom AIC: 571.65 Number of Fisher Scoring iterations: 3 > > mod.disp <- glm.poisson.disp(mod) Poisson overdispersed log-linear model fitting... Iter. 1 sigma^2: 0.004150272 Iter. 2 sigma^2: 0.003747225 Iter. 3 sigma^2: 0.003651023 Iter. 4 sigma^2: 0.003626604 Iter. 5 sigma^2: 0.003620276 Iter. 6 sigma^2: 0.003618627 Iter. 7 sigma^2: 0.003618197 Iter. 8 sigma^2: 0.003618085 Iter. 9 sigma^2: 0.003618056 Iter. 10 sigma^2: 0.003618048 Iter. 11 sigma^2: 0.003618046 Iter. 12 sigma^2: 0.003618045 Iter. 13 sigma^2: 0.003618045 Converged after 13 iterations. Estimated dispersion parameter: 0.003618045 Call: glm(formula = incid ~ offset(log(pop)) + Age + Cohort, family = poisson(log), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.7774 -0.5035 -0.0897 0.5889 1.7471 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -8.64453 0.12539 -68.940 < 2e-16 *** Age55-59 0.82267 0.04461 18.443 < 2e-16 *** Age60-64 1.54904 0.04520 34.269 < 2e-16 *** Age65-69 2.12764 0.04619 46.066 < 2e-16 *** Age70-74 2.69624 0.04785 56.348 < 2e-16 *** Age75-79 3.17241 0.05003 63.408 < 2e-16 *** Age80-84 3.47447 0.05335 65.129 < 2e-16 *** Cohort1860-64 0.35468 0.13296 2.668 0.00764 ** Cohort1865-69 0.51920 0.12542 4.140 3.48e-05 *** Cohort1870-74 0.77428 0.12250 6.321 2.60e-10 *** Cohort1875-79 1.01212 0.12128 8.345 < 2e-16 *** Cohort1880-84 1.15071 0.12066 9.536 < 2e-16 *** Cohort1885-89 1.29932 0.12035 10.796 < 2e-16 *** Cohort1890-94 1.54559 0.12230 12.638 < 2e-16 *** Cohort1895-99 1.57541 0.12344 12.763 < 2e-16 *** Cohort1900-04 1.62779 0.12502 13.021 < 2e-16 *** Cohort1905-09 1.46431 0.12792 11.447 < 2e-16 *** Cohort1910-14 1.37192 0.13347 10.279 < 2e-16 *** Cohort1915-19 1.25628 0.15029 8.359 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 9139.332 on 48 degrees of freedom Residual deviance: 29.984 on 30 degrees of freedom AIC: 193.63 Number of Fisher Scoring iterations: 3 > summary(mod.disp) Call: glm(formula = incid ~ offset(log(pop)) + Age + Cohort, family = poisson(log), weights = disp.weights) Deviance Residuals: Min 1Q Median 3Q Max -1.7774 -0.5035 -0.0897 0.5889 1.7471 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -8.64453 0.12539 -68.940 < 2e-16 *** Age55-59 0.82267 0.04461 18.443 < 2e-16 *** Age60-64 1.54904 0.04520 34.269 < 2e-16 *** Age65-69 2.12764 0.04619 46.066 < 2e-16 *** Age70-74 2.69624 0.04785 56.348 < 2e-16 *** Age75-79 3.17241 0.05003 63.408 < 2e-16 *** Age80-84 3.47447 0.05335 65.129 < 2e-16 *** Cohort1860-64 0.35468 0.13296 2.668 0.00764 ** Cohort1865-69 0.51920 0.12542 4.140 3.48e-05 *** Cohort1870-74 0.77428 0.12250 6.321 2.60e-10 *** Cohort1875-79 1.01212 0.12128 8.345 < 2e-16 *** Cohort1880-84 1.15071 0.12066 9.536 < 2e-16 *** Cohort1885-89 1.29932 0.12035 10.796 < 2e-16 *** Cohort1890-94 1.54559 0.12230 12.638 < 2e-16 *** Cohort1895-99 1.57541 0.12344 12.763 < 2e-16 *** Cohort1900-04 1.62779 0.12502 13.021 < 2e-16 *** Cohort1905-09 1.46431 0.12792 11.447 < 2e-16 *** Cohort1910-14 1.37192 0.13347 10.279 < 2e-16 *** Cohort1915-19 1.25628 0.15029 8.359 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for poisson family taken to be 1) Null deviance: 9139.332 on 48 degrees of freedom Residual deviance: 29.984 on 30 degrees of freedom AIC: 193.63 Number of Fisher Scoring iterations: 3 > mod.disp$dispersion [1] 0.003618045 > > > > cleanEx(); ..nameEx <- "holford" > > ### * holford > > flush(stderr()); flush(stdout()) > > ### Name: holford > ### Title: Holford's data on prostatic cancer deaths > ### Aliases: holford > ### Keywords: datasets > > ### ** Examples > > > > cleanEx(); ..nameEx <- "lm.disp" > > ### * lm.disp > > flush(stderr()); flush(stdout()) > > ### Name: lm.disp > ### Title: Normal dispersion models. > ### Aliases: lm.disp summary.dispmod > ### Keywords: models regression > > ### ** Examples > > data(minitab) > attach(minitab) > > y <- V^(1/3) > summary(mod <- lm(y ~ H + D)) Call: lm(formula = y ~ H + D) Residuals: Min 1Q Median 3Q Max -0.159602 -0.050200 -0.006827 0.069649 0.133981 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.085388 0.184315 -0.463 0.647 H 0.014472 0.002777 5.211 1.56e-05 *** D 0.151516 0.005639 26.871 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.08283 on 28 degrees of freedom Multiple R-Squared: 0.9777, Adjusted R-squared: 0.9761 F-statistic: 612.5 on 2 and 28 DF, p-value: < 2.2e-16 > > summary(mod.disp1 <- lm.disp(y ~ H + D)) Iteration 1: deviance = -69.62317 Iteration 2: deviance = -74.79983 Iteration 3: deviance = -74.79994 Iteration 4: deviance = -74.79994 Iteration 5: deviance = -74.79994 Normal dispersion model --------------------------------------------------------------------------------lm.disp(formula = y ~ H + D) Model for the mean ------------------ Call: y ~ H + D Deviance Residuals: Min 1Q Median 3Q Max -2.17344 -0.61593 -0.07703 0.72005 1.98060 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.098923 0.128846 -0.768 0.443 H 0.014858 0.002110 7.040 1.92e-12 *** D 0.150292 0.004879 30.805 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for gaussian family taken to be 1) Null deviance: 1773.4 on 30 degrees of freedom Residual deviance: 31.0 on 28 degrees of freedom AIC: -21435 Number of Fisher Scoring iterations: 2 Model for the variance ---------------------- Call: ~H + D Deviance Residuals: Min 1Q Median 3Q Max -3.4798 -1.8370 -0.7692 0.2188 2.0838 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -14.04413 3.14704 -4.463 8.1e-06 *** H 0.10972 0.04742 2.314 0.0207 * D 0.03429 0.09628 0.356 0.7217 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for Gamma family taken to be 2) Null deviance: 83.542 on 30 degrees of freedom Residual deviance: 73.080 on 28 degrees of freedom AIC: -265.09 Number of Fisher Scoring iterations: 15 -2*logLik(max), constant var. = -69.62317 -2*logLik(max), model = -74.79994 LRT = 5.176767 on 2 df, p-value = 0.075141 > summary(mod.disp2 <- lm.disp(y ~ H + D, ~ H)) Iteration 1: deviance = -69.62317 Iteration 2: deviance = -74.73305 Iteration 3: deviance = -74.73319 Iteration 4: deviance = -74.73319 Iteration 5: deviance = -74.73319 Normal dispersion model --------------------------------------------------------------------------------lm.disp(formula = y ~ H + D, var.formula = ~H) Model for the mean ------------------ Call: y ~ H + D Deviance Residuals: Min 1Q Median 3Q Max -2.1352 -0.6078 -0.0824 0.7117 2.0295 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.104158 0.129982 -0.801 0.423 H 0.014932 0.002133 7.000 2.56e-12 *** D 0.150288 0.004835 31.083 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for gaussian family taken to be 1) Null deviance: 1821.3 on 30 degrees of freedom Residual deviance: 31.0 on 28 degrees of freedom AIC: -20864 Number of Fisher Scoring iterations: 2 Model for the variance ---------------------- Call: ~H Deviance Residuals: Min 1Q Median 3Q Max -3.3566 -1.8246 -0.7049 0.2179 2.0209 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -14.01098 3.09013 -4.534 5.78e-06 *** H 0.11529 0.04052 2.845 0.00444 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for Gamma family taken to be 2) Null deviance: 82.943 on 30 degrees of freedom Residual deviance: 72.609 on 29 degrees of freedom AIC: -266.75 Number of Fisher Scoring iterations: 13 -2*logLik(max), constant var. = -69.62317 -2*logLik(max), model = -74.73319 LRT = 5.110013 on 1 df, p-value = 0.023788 > > # Likelihood ratio test > deviances <- c(mod.disp1$initial.deviance, mod.disp2$deviance, mod.disp1$deviance) > lrt <- c(NA, abs(diff(deviances))) > cbind(deviances, lrt, p.value=1-pchisq(lrt, 1)) deviances lrt p.value [1,] -69.62317 NA NA [2,] -74.73319 5.110013 0.02378814 [3,] -74.79994 0.066754 0.79612294 > > # quadratic dispersion model on D (as discussed by Aitkin) > summary(mod.disp4 <- lm.disp(y ~ H + D, ~ D + I(D^2))) Iteration 1: deviance = -69.62317 Iteration 2: deviance = -83.59174 Iteration 3: deviance = -84.86876 Iteration 4: deviance = -85.33767 Iteration 5: deviance = -85.46138 Iteration 6: deviance = -85.4834 Iteration 7: deviance = -85.48639 Iteration 8: deviance = -85.48675 Iteration 9: deviance = -85.48679 Iteration 10: deviance = -85.4868 Iteration 11: deviance = -85.4868 Iteration 12: deviance = -85.4868 Iteration 13: deviance = -85.4868 Normal dispersion model --------------------------------------------------------------------------------lm.disp(formula = y ~ H + D, var.formula = ~D + I(D^2)) Model for the mean ------------------ Call: y ~ H + D Deviance Residuals: Min 1Q Median 3Q Max -1.4268 -0.5433 -0.0558 0.9535 2.3787 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.0954705 0.0530634 1.799 0.072 . H 0.0116680 0.0009712 12.014 <2e-16 *** D 0.1526960 0.0016783 90.984 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for gaussian family taken to be 1) Null deviance: 69793 on 30 degrees of freedom Residual deviance: 31 on 28 degrees of freedom AIC: -547551 Number of Fisher Scoring iterations: 2 Model for the variance ---------------------- Call: ~D + I(D^2) Deviance Residuals: Min 1Q Median 3Q Max -3.1825 -1.5035 -0.4161 0.2954 2.4186 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -41.39738 4.75937 -8.698 < 2e-16 *** D 5.17224 0.69860 7.404 1.32e-13 *** I(D^2) -0.17683 0.02467 -7.168 7.62e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for Gamma family taken to be 2) Null deviance: 104.500 on 30 degrees of freedom Residual deviance: 67.675 on 28 degrees of freedom AIC: -284.15 Number of Fisher Scoring iterations: 7 -2*logLik(max), constant var. = -69.62317 -2*logLik(max), model = -85.4868 LRT = 15.86362 on 2 df, p-value = 0.00035914 > r <- mod$residuals > plot(D, log(r^2)) > phi.est <- mod.disp4$var$fitted.values > lines(D, log(phi.est)) > > > > cleanEx(); ..nameEx <- "minitab" > > ### * minitab > > flush(stderr()); flush(stdout()) > > ### Name: minitab > ### Title: Minitab tree data > ### Aliases: minitab > ### Keywords: datasets > > ### ** Examples > > > > cleanEx(); ..nameEx <- "orobanche" > > ### * orobanche > > flush(stderr()); flush(stdout()) > > ### Name: orobanche > ### Title: Germination of Orobanche > ### Aliases: orobanche > ### Keywords: datasets > > ### ** Examples > > > > cleanEx(); ..nameEx <- "salmonellaTA98" > > ### * salmonellaTA98 > > flush(stderr()); flush(stdout()) > > ### Name: salmonellaTA98 > ### Title: Salmonella reverse mutagenicity assay > ### Aliases: salmonellaTA98 > ### Keywords: datasets > > ### ** Examples > > > > ### *