R/qresid_binom.R

Defines functions qresid_binom

qresid_binom = function(model) {
  p.obs <- model$y
  n <- model$prior.weights
  y <- n * p.obs
  pi.hat <- fitted(model)
  u <- runif(n)
  binom.cdf <- pbinom(round(y)-1, size = n, prob = pi.hat) + u * dbinom(round(y), size = n, prob = pi.hat)
  res <- qnorm(binom.cdf)
  res
  
}

Try the glmxdiag package in your browser

Any scripts or data that you put into this service are public.

glmxdiag documentation built on Jan. 10, 2022, 9:07 a.m.