R/coef.carbayes.R

Defines functions coef.CARBayes

Documented in coef.CARBayes

coef.CARBayes <- function(object,...)
{
    #### Return the estimated regression coefficient
    if(is.null(nrow(object$samples$beta)))
    {
        return(NULL)  
    }else
    {
    beta <- apply(object$samples$beta, 2, median)
    names(beta) <- colnames(object$X)    
    return(beta)
    }
}
duncanplee/CARBayes documentation built on June 5, 2017, 3:20 a.m.