Learn R Programming

rcompanion (version 1.0.1)

nagelkerkeHermite: Pseudo r-squared measures for hermite models

Description

Produces McFadden, Cox and Snell, and Nagelkerke pseudo R-squared measures, along with p-value for the model, for hermite regression objects.

Usage

nagelkerkeHermite(fit, null)

Arguments

fit
The fitted model object for which to determine pseudo r-squared.
null
The null model object against which to compare the fitted model object. The null model must be nested in the fitted model to be valid.

Value

A list of four objects describing the models used, the pseudo r-squared values, the likelihood ratio test for the model, and AIC for the fitted and null models.

Details

Hermite regression is performed with the hermite package. For pseudo r-squared measures, Cox and Snell is also referred to as ML. Nagelkerke is also referred to as Cragg and Uhler.

References

http://rcompanion.org/handbook/J_01.html

See Also

nagelkerke

Examples

Run this code
data(Monarchs)
library(hermite)
model = glm.hermite(Monarchs ~ Garden,
                    data = Monarchs,
                    link = "log",
                    m=3)
null = glm.hermite(Monarchs ~ 1,
                   data = Monarchs,
                   link = "log",
                   m=3)
nagelkerkeHermite(model, null)

Run the code above in your browser using DataLab