analyze: Analyze a sgcca object

View source: R/analyse_sgcca.R

analyzeR Documentation

Analyze a sgcca object

Description

Performs calculations to the output of sgcca to make it easier to retrieve the information about the result.

Usage

analyze(sgcca)

Arguments

sgcca

SGCCA object from the RGCCA package

Details

Calculates the correlations between the canonical dimensions, calculates the canonical correlations, returns also the weight of each link of the model used, all of this in a tidy way.

Value

A vector with the correlation between components, AVE (both inner and outer), the canonical correlation, the weight in the design matrix, and the number of interactions that exists.

Examples

data("Russett", package = "RGCCA")
X_agric <- as.matrix(Russett[, c("gini", "farm", "rent")])
X_ind <- as.matrix(Russett[, c("gnpr", "labo")])
X_polit <- as.matrix(Russett[ , c("inst", "ecks",  "death", "demostab",
                                  "dictator")])
A <- list(X_agric, X_ind, X_polit)
A <- lapply(A, function(x) scale2(x, bias = TRUE))
C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3)
out <- RGCCA::rgcca(A, C, tau =rep(0, 3), scheme = "factorial",
                    scale = FALSE, verbose = TRUE)
analyze(out)

llrs/inteRmodel documentation built on April 1, 2022, 4:04 p.m.