R/print.CA3variants.R

Defines functions print.CA3variants

Documented in print.CA3variants

print.CA3variants <-function(x, digits=3,...) {
    cat("Number of iteration steps \n")
    print(x$iteration)
    cat("\n    RESULTS for 3-way Correspondence Analysis\n")
        if ((x$ca3type=="CA3")|(x$ca3type=="OCA3")){
        cat("Three-way Pearson ratio table \n")
        print(round(x$xs, digits = 2))
    } 
else {
        cat("Three-way centered column profile table \n")
        print(round(x$xs, digits = 2))
    }
cat("\n Row marginals\n\n")
     print(round(apply(x$DataMatrix/sum(x$DataMatrix), 1, sum), digits = digits))
cat("\n Column marginals\n\n")
     print(round(apply(x$DataMatrix/sum(x$DataMatrix), 2, sum), digits = digits))
cat("\n Tube marginals\n\n")
     print(round(apply(x$DataMatrix/sum(x$DataMatrix), 3, sum), digits = digits))
    cat("Reconstruction of Data array by components and core array \n")
    print(round(x$xhat, digits = digits))
    cat("Explained inertia ", x$nxhat2, "\n\n")
    cat("Total inertia ", x$inertia, "\n\n")
    cat("Percent inertia  \n\n")
    print(round(x$inertiapc,digits=digits))
cat("The percentage contribution of the three components to the total variation\n\n")
    print(round(x$inertiapc,digits=digits))
cat("The vector of the percentage contributions of the interactively coded colum-tube  components to the total inertia, 
useful for making interactively coded biplots\n\n")
    print(round(x$inertiacoltub,digits=digits))
cat("The vector of the percentage contributions of the row  components to the total inertia, 
useful for making response biplots\n\n")
    print(round(x$inertiarow,digits=digits))
    cat("Proportion of explained inertia (when reducing dimensions)\n\n")
    print(x$prp)
    cat("\n Rows in principal coordinates\n\n")
    print(round(x$fi), digits = digits)
    cat("\n Rows in standard coordinates\n\n")
    print(round(x$fiStandard, digits = digits))
    cat("\n Column-tubes in principal coordinates\n\n")
    print(round(x$gjk, digits = digits))
 cat("\n Column-tubes in standard coordinates\n\n")
    print(round(x$gjkStandard, digits = digits))
    cat("\n Coordinate Inner Product\n\n")
    print(round(x$iproduct, digits = digits))
    cat("Core array i.e. Generalised singular values  \n\n")
    print(round(x$g, digits = digits))
    cat("\n Index partionings\n\n")
    print(round(x$index3,digits=digits))
    cat("\n\n")
}

Try the CA3variants package in your browser

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

CA3variants documentation built on Aug. 1, 2019, 5:06 p.m.