R/cooks.distance.drc.R

Defines functions cooks.distance.drc

Documented in cooks.distance.drc

cooks.distance.drc <- function(model, ...)
{
    hatVal <- hatvalues(model)
    
    mse <- (rse(model))^2
    if (is.na(mse)) {mse <- 1}  
    # default for generalized linear models (assuming no overdispersion!)
    
    (residuals(model)^2) * (hatVal/((1-hatVal)^2)) / ((length(hatVal)- df.residual(model)) * mse)
}

Try the drc package in your browser

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

drc documentation built on May 1, 2019, 8:43 p.m.