hosmerlem_test: Hosmer-Lemeshow goodness of fit test

View source: R/hosmerlem_test.R

hosmerlem_testR Documentation

Hosmer-Lemeshow goodness of fit test

Description

The Hosmer-Lemeshow test is a statistical test for goodness of fit for logistic regression models.

Usage

hosmerlem_test(mod, k = 10)

Arguments

mod

a model object created by lm, glm, lmer, glmer

k

number of bins to use to calculate quantiles

Value

a dataframe

Examples

## Not run: 
set.seed(43214)
x <- rnorm(100)
pr <- exp(x)/(1+exp(x))
y <- 1*(runif(100) < pr)
mod <- glm(y~x, family=binomial)
hosmerlem_test(mod, k = 10)

## End(Not run)

jasongraf1/VADIS documentation built on July 19, 2023, 10:26 p.m.