R/print.decomposition.R

print.decomposition <-
function(x, ...)
    {
    if (class(x) != "decomposition") stop("Object is not of class decomposition")
    cat("Overall CI:", concentrationIndex(x$overallci), "\n")
    if (x$outcomeCorrected) cat("(based on a corrected value)\n")
    cat("\n")
    
    cat("Decomposition:\n")
    result <- data.frame(x$contribution)
    names(result) <- "Contribution (%)"
    result$Corrected <- ""
    result$Corrected[x$correctedCoefficients] <- "yes"
    result$Corrected[!x$correctedCoefficients] <- "no"
    print(result)
    }

Try the decomp package in your browser

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

decomp documentation built on May 2, 2019, 6:53 p.m.