Rev 64657 | Rev 84029 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/stats/man/summary.glm.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2013 R Core Team% Distributed under GPL 2 or later\name{summary.glm}\alias{summary.glm}\alias{print.summary.glm}\title{Summarizing Generalized Linear Model Fits}\usage{\method{summary}{glm}(object, dispersion = NULL, correlation = FALSE,symbolic.cor = FALSE, \dots)\method{print}{summary.glm}(x, digits = max(3, getOption("digits") - 3),symbolic.cor = x$symbolic.cor,signif.stars = getOption("show.signif.stars"), \dots)}\arguments{\item{object}{an object of class \code{"glm"}, usually, a result of acall to \code{\link{glm}}.}\item{x}{an object of class \code{"summary.glm"}, usually, a result of acall to \code{summary.glm}.}\item{dispersion}{the dispersion parameter for the family used.Either a single numerical value or \code{NULL} (the default), whenit is inferred from \code{object} (see \sQuote{Details}).}\item{correlation}{logical; if \code{TRUE}, the correlation matrix ofthe estimated parameters is returned and printed.}\item{digits}{the number of significant digits to use when printing.}\item{symbolic.cor}{logical. If \code{TRUE}, print the correlations ina symbolic form (see \code{\link{symnum}}) rather than as numbers.}\item{signif.stars}{logical. If \code{TRUE}, \sQuote{significance stars}are printed for each coefficient.}\item{\dots}{further arguments passed to or from other methods.}}\description{These functions are all \code{\link{methods}} for class \code{glm} or\code{summary.glm} objects.}\details{\code{print.summary.glm} tries to be smart about formatting thecoefficients, standard errors, etc. and additionally gives\sQuote{significance stars} if \code{signif.stars} is \code{TRUE}.The \code{coefficients} component of the result gives the estimatedcoefficients and their estimated standard errors, together with theirratio. This third column is labelled \code{t ratio} if thedispersion is estimated, and \code{z ratio} if the dispersion is known(or fixed by the family). A fourth column gives the two-tailedp-value corresponding to the t or z ratio based on a Student t orNormal reference distribution. (It is possible that the dispersion isnot known and there are no residual degrees of freedom from which toestimate it. In that case the estimate is \code{NaN}.)Aliased coefficients are omitted in the returned object but restoredby the \code{print} method.Correlations are printed to two decimal places (or symbolically): tosee the actual correlations print \code{summary(object)$correlation}directly.The dispersion of a GLM is not used in the fitting process, but it isneeded to find standard errors.If \code{dispersion} is not supplied or \code{NULL},the dispersion is taken as \code{1} for the \code{binomial} and\code{Poisson} families, and otherwise estimated by the residualChisquared statistic (calculated from cases with non-zero weights)divided by the residual degrees of freedom.\code{summary} can be used with Gaussian \code{glm} fits to handle thecase of a linear regression with known error variance, something nothandled by \code{\link{summary.lm}}.}\value{\code{summary.glm} returns an object of class \code{"summary.glm"}, alist with components\item{call}{the component from \code{object}.}\item{family}{the component from \code{object}.}\item{deviance}{the component from \code{object}.}\item{contrasts}{the component from \code{object}.}\item{df.residual}{the component from \code{object}.}\item{null.deviance}{the component from \code{object}.}\item{df.null}{the component from \code{object}.}\item{deviance.resid}{the deviance residuals:see \code{\link{residuals.glm}}.}\item{coefficients}{the matrix of coefficients, standard errors,z-values and p-values. Aliased coefficients are omitted.}\item{aliased}{named logical vector showing if the originalcoefficients are aliased.}\item{dispersion}{either the supplied argument or the inferred/estimateddispersion if the latter is \code{NULL}.}\item{df}{a 3-vector of the rank of the model and the number ofresidual degrees of freedom, plus number of coefficients (includingaliased ones).}\item{cov.unscaled}{the unscaled (\code{dispersion = 1}) estimated covariancematrix of the estimated coefficients.}\item{cov.scaled}{ditto, scaled by \code{dispersion}.}\item{correlation}{(only if \code{correlation} is true.) The estimatedcorrelations of the estimated coefficients.}\item{symbolic.cor}{(only if \code{correlation} is true.) The valueof the argument \code{symbolic.cor}.}}\seealso{\code{\link{glm}}, \code{\link{summary}}.}\examples{## For examples see example(glm)}\keyword{models}\keyword{regression}