R/qresid_betabin.R

Defines functions qresid_betabin

qresid_betabin <- function(model)  {
  
  n <- model@prior.weights
  y <- model@y * n
  mu <- model@fitted.values
  rho <- model@misc$rho
  a <- pbetabinom(y - 1, n, mu, rho)
  b <- pbetabinom(y, n, mu, rho)
  betabin.cdf <- runif(length(y), min = a, max = b)
  res <- qnorm(betabin.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.