boot_samples_sgcca | R Documentation |
Function to perform bootstrap on the samples. boot_samples_sgcca
bootstrap given original data, while boot_index_sgcca()
given some
index of samples it iterates over it.
boot_samples_sgcca(..., nb_boot = 1000, verbose = TRUE) boot_index_sgcca(index, ..., BPPARAM = BiocParallel::SerialParam())
... |
Named arguments passed to sgcca. |
nb_boot |
Number of bootstraps to perform. |
verbose |
Logical, should it print a progress bar (default) or not? |
index |
A list of numeric values for selecting values |
BPPARAM |
Set up parallel backend (see BiocParallel documentation). |
boot_index_sgcca
Iterate over the index,
which is a list of vectors with the position of samples to use and use sgcca
with the arguments provided.
boot_samples_sgcca
Iterate over random samples without recording which samples where used.
A list with two elements: the coefficient of each variable of the input blocks; and the AVE values, both inner, and outer
Recommended to provide scaled data and the argument scale = FALSE
boot_index()
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) C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) out <- boot_samples_sgcca(A = A, C = C, c1 = rep(1, 3), nb_boot = 10) head(out$AVE) boots <- 10 index <- boot_index(nrow(A[[1]]), boots) boot_i <- boot_index_sgcca(index, A = A, C = C)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.