https://github.com/cran/CARBayes
Raw File
Tip revision: a8f860faed530b83e77aff5e710dcd60c417f762 authored by Duncan Lee on 03 February 2021, 08:10:02 UTC
version 5.2.3
Tip revision: a8f860f
residuals.CARBayes.R
residuals.CARBayes <- function(object, type="pearson", ...)
{
residuals <- object$residuals    
 

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

    if(class(residuals)=="list")
    {
    #### 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.")   
        }
    }
}
back to top