Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summary.gnm

Summarize Generalized Nonlinear Model Fits


Description

summary method for objects of class "gnm"

Usage

## S3 method for class 'gnm'
summary(object, dispersion = NULL, correlation = FALSE,
                      symbolic.cor = FALSE, with.eliminate = FALSE, ...)

## S3 method for class 'summary.gnm'
print(x, digits = max(3, getOption("digits") - 3),
                            signif.stars = getOption("show.signif.stars"),
                            symbolic.cor = x$symbolic.cor, ...)

Arguments

object

an object of class "gnm".

x

an object of class "summary.gnm".

dispersion

the dispersion parameter for the fitting family. By default it is obtained from object.

correlation

logical: if TRUE, the correlation matrix of the estimated parameters is returned.

digits

the number of significant digits to use when printing.

symbolic.cor

logical: if TRUE, the correlations are printed in a symbolic form rather than numbers (see symnum).

signif.stars

logical. If TRUE, "significance stars" are printed for each coefficient.

with.eliminate

Logical. If TRUE, any eliminated coefficients are included in the summary.

...

further arguments passed to or from other methods.

Details

print.summary.gnm prints the original call to gnm; a summary of the deviance residuals from the model fit; the coefficients of the model; the residual deviance; the Akaike's Information Criterion value, and the number of main iterations performed.

Standard errors, z-values and p-values are printed alongside the coefficients, with "significance stars" if signif.stars is TRUE.

When the "summary.gnm" object has a "correlation" component, the lower triangle of this matrix is also printed, to two decimal places (or symbolically); to see the full matrix of correlations print summary(object, correlation = TRUE)$correlation directly.

The standard errors returned by summary.gnm are scaled by sqrt(dispersion). If the dispersion is not specified, it is taken as 1 for the binomial and Poisson families, and otherwise estimated by the residual Chi-squared statistic divided by the residual degrees of freedom. For coefficients that have been constrained or are not estimable, the standard error is returned as NA.

Value

summary.gnm returns an object of class "summary.gnm", which is a list with components

call

the "call" component from object.

ofInterest

the "ofInterest" component from object.

family

the "family" component from object.

deviance

the "deviance" component from object.

aic

the "aic" component from object.

df.residual

the "df.residual" component from object.

iter

the "iter" component from object.

deviance.resid

the deviance residuals, see residuals.glm.

coefficients

the matrix of coefficients, standard errors, z-values and p-values.

elim.coefs

if with.eliminate = TRUE a matrix of eliminated coefficients, standard errors, z-values and p-values.

dispersion

either the supplied argument or the estimated dispersion if the latter is NULL.

df

a 3-vector of the rank of the model; the number of residual degrees of freedom, and number of unconstrained coefficients.

cov.scaled

the estimated covariance matrix scaled by dispersion (see vcov.gnm for more details).

correlation

(only if correlation is TRUE) the estimated correlations of the estimated coefficients.

symbolic.cor

(only if correlation is TRUE) the value of the argument symbolic.cor.

Note

The gnm class includes generalized linear models, and it should be noted that summary.gnm differs from summary.glm in that it does not omit coefficients which are NA from the objects it returns. (Such coefficients are NA since they have been fixed at 0 either by use of the constrain argument to gnm or by a convention to handle linear aliasing).

Author(s)

Modification of summary.glm by the R Core Team. Adapted for "gnm" objects by Heather Turner.

See Also

Examples

### First example from ?Dref
set.seed(1)

## reconstruct counts voting Labour/non-Labour
count <- with(voting, percentage/100 * total)
yvar <- cbind(count, voting$total - count)
     
## fit diagonal reference model with constant weights
classMobility <- gnm(yvar ~ -1 + Dref(origin, destination), 
                     family = binomial, data = voting)

## summarize results - note diagonal weights are over-parameterised
summary(classMobility)

## refit setting first weight to zero (as DrefWeights() does)
classMobility <- gnm(yvar ~ -1 + Dref(origin, destination), 
                     family = binomial, data = voting,
                     constrain = "delta1")
summary(classMobility)

gnm

Generalized Nonlinear Models

v1.1-1
GPL-2 | GPL-3
Authors
Heather Turner [aut, cre] (<https://orcid.org/0000-0002-1256-3375>), David Firth [aut] (<https://orcid.org/0000-0003-0302-2312>), Brian Ripley [ctb], Bill Venables [ctb], Douglas M. Bates [ctb], Martin Maechler [ctb] (<https://orcid.org/0000-0002-8685-9910>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.