Description Usage Arguments Details Value Author(s) References Examples
Hosmer-Lemeshow Goodness of Fit (GOF) Test.
1 | hoslem.test(x, y, g = 10)
|
x |
a numeric vector of observations, binary (0/1). |
y |
expected values. |
g |
number of bins to use to calculate quantiles. |
The Hosmer-Lemeshow test is a statistical test for goodness of fit for logistic regression models.
A list with class "htest"
containing the following components:
statistic |
the value of the chi-squared test statistic,
( |
parameter |
the degrees of freedom of the approximate
chi-squared distribution of the test statistic ( |
p.value |
the p-value for the test. |
method |
a character string indicating the type of test performed. |
data.name |
a character string giving the name(s) of the data. |
observed |
the observed frequencies in a |
expected |
the expected frequencies in a |
Peter Solymos by adapting code pieces from R help mailing list
Hosmer D W, Lemeshow S 2000. Applied Logistic Regression. New York, USA: John Wiley and Sons.
1 2 3 4 5 6 |
ResourceSelection 0.3-2 2017-02-28
Hosmer and Lemeshow goodness of fit (GOF) test
data: m$y, fitted(m)
X-squared = 4.5227, df = 8, p-value = 0.8072
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.