https://github.com/cran/CARBayes
Raw File
Tip revision: 9ec653c78ae503302a093c858766eceb08346190 authored by Duncan Lee on 15 January 2021, 12:10:23 UTC
version 5.2.2
Tip revision: 9ec653c
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