[R] two kind of Hosmer and Lemeshow’s test

From: leo_wa <kwngai6022_at_hotmail.com>
Date: Fri, 07 Nov 2008 05:31:53 -0800 (PST)

I know that there are two method to apply the Hosmer and Lemeshow’s. One of them is calculated based on the fixed and pre-determined cut-off points of the estimated probability of success. One of them is calculated based on the percentiles of estimated probabilities. In the previous post,i find that the Hosmer and Lemeshow’s test how to use in R.
hosmerlem <-
function (y, yhat, g = 10)

    cutyhat <- cut(x, breaks = quantile(yhat, probs = seq(0,

        1, 1/g)), include.lowest = T)
    obs <- xtabs(cbind(1 - y, y) ~ cutyhat)     expect <- xtabs(cbind(1 - yhat, yhat) ~ cutyhat)     chisq <- sum((obs - expect)^2/expect)     P <- 1 - pchisq(chisq, g - 2)
    c("X^2" = chisq, Df = g - 2, "P(>Chi)" = P) }
I want to know how can i use the another method which is not use the probability of success. i want to know how can i revise above program to achieve an objective.

View this message in context: http://www.nabble.com/two-kind-of-Hosmer-and-Lemeshow%E2%80%99s-test-tp20380578p20380578.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 07 Nov 2008 - 13:42:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Nov 2008 - 23:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive