Last chance! 50% off unlimited learning
Sale ends in
Produces McFadden, Cox and Snell, and Nagelkerke pseudo R-squared measures, along with p-value for the model, for hermite regression objects.
nagelkerkeHermite(fit, null)
The fitted model object for which to determine pseudo r-squared.
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.
A list of six objects describing the models used, the pseudo r-squared values, the likelihood ratio test for the model, the AIC for the fitted and null models, the number of observations for the models, and any warnings.
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.
The fit model and the null model should be properly nested. That is, the terms of one need to be a subset of the the other, and they should have the same set of observations.
# NOT RUN {
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