Learn R Programming

exactLoglinTest (version 1.4.2)

gof: Goodness-of-fit function for Poisson log-linear models

Description

A goodness-of-fit function for Poisson log-linear models as required by mcexact.

Usage

gof(y = NULL, mu = NULL, rowlabels = FALSE)

Arguments

y
counts
mu
mean
rowlabels
labels of returned goodness-of-fit statistics

Value

If rowlabels = TRUE, then gof returns only the labels of the goodness of fit statistics. Otherwise it returns the actual values as a vector.

Details

This function is a useful shell for writing alternative goodness-of-fit statistics for mcexact.

See Also

mcexact

Examples

Run this code
#data(residence)
#get fitted values
#mu <- glm(residence$y ~ residence$x, family = poisson)$fit
#gof(residence$y, mu)
#gof(rowlabels = TRUE)

Run the code above in your browser using DataLab