R/residuals.CARBayes.R

Defines functions residuals.CARBayes

Documented in residuals.CARBayes

residuals.CARBayes <- function(object, type="pearson", ...)
{
residuals <- object$residuals    
 

#### The multivariate models provides lists the univariate models provide matrices

    if(is.list(residuals))
    {
    #### Return one of two types of residuals
        if(type=="response")
        {
        return(residuals$response)
        }else if(type=="pearson")
        {
            return(residuals$pearson)
        }else
        {
            return("Error. That is not one of the allowable residual types.")   
        }
        
    }else
    {
    #### Return one of two types of residuals
        if(type=="response")
        {
        return(residuals$response)
        }else if(type=="pearson")
        {
        return(residuals$pearson)
        }else
        {
        return("Error. That is not one of the allowable residual types.")   
        }
    }
}

Try the CARBayes package in your browser

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

CARBayes documentation built on Nov. 17, 2023, 5:07 p.m.