A numerical scalar indicating the number of digits to be printed after the decimal place.
...
Further arguments passed to print.
Details
Function gof calculates the deviance \(D\) and the Pearson chi-squared \(X^2\) statistics for the model under consideration. Let \(y\) be the observed response, and \(E[y] = \mu\) and \(Var[y]\) its mean and variance estimated from the model, statistic \(X^2\) is calculated by:
$$X^2 = \sum_{i}( (y_i - \mu)^2/Var[y_i] )$$
Assuming that the data length is \(N\) and the number of the parameters in the model is \(p\), eqnD and eqnX^2 are compared to a chi-squared distribution with \(N-p\) degrees of freedom.
References
Agresti, A. Categorical data analysis. Wiley, 1990.
data(orob2)
fm1 <- glm(cbind(m, n - m) ~ seed, data = orob2, family = binomial)
fm2 <- aodml(cbind(m, n - m) ~ seed, data = orob2, family = "bb")
gof(fm1)
gof(fm2)