diff --git a/articles/RGCCA.pdf b/articles/RGCCA.pdf index 30ce1f21..47c00a47 100644 Binary files a/articles/RGCCA.pdf and b/articles/RGCCA.pdf differ diff --git a/pkgdown.yml b/pkgdown.yml index 0a3c4c5b..079f5cf4 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: RGCCA: RGCCA.pdf -last_built: 2023-12-11T12:33Z +last_built: 2024-02-05T15:35Z urls: reference: https://rgcca-factory.github.io/RGCCA/reference article: https://rgcca-factory.github.io/RGCCA/articles diff --git a/reference/rgcca.html b/reference/rgcca.html index 846af015..322cfe6c 100644 --- a/reference/rgcca.html +++ b/reference/rgcca.html @@ -451,7 +451,6 @@

Examples verbose = TRUE ) #> Computation of the RGCCA block components based on the factorial scheme -#> Shrinkage intensity parameters are chosen manually #> Computation of the RGCCA block components #1 is under progress... #> Iter: 1 Fit: 0.71713961 Dif: 0.06767066 #> Iter: 2 Fit: 0.71721572 Dif: 0.00007611 diff --git a/reference/rgcca_bootstrap-1.png b/reference/rgcca_bootstrap-1.png index 5f2aa73e..5efc1d29 100644 Binary files a/reference/rgcca_bootstrap-1.png and b/reference/rgcca_bootstrap-1.png differ diff --git a/reference/rgcca_cv.html b/reference/rgcca_cv.html index 98ed71f4..f0159a46 100644 --- a/reference/rgcca_cv.html +++ b/reference/rgcca_cv.html @@ -62,6 +62,7 @@

Usage

rgcca_cv(
   blocks,
+  connection = NULL,
   method = "rgcca",
   response = NULL,
   par_type = "tau",
@@ -104,6 +105,11 @@ 

Arguments Improve the documentation πŸ“–","what":"Function documentation","title":"Contributing to RGCCA","text":"Functions described comments near code translated documentation using roxygen2. want improve function description: Go R/ directory code repository. Look file name function. Propose file change update function documentation roxygen comments (starting #').","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"contribute-code-","dir":"","previous_headings":"How you can contribute","what":"Contribute code πŸ“","title":"Contributing to RGCCA","text":"Care fix bugs implement new functionality RGCCA? Awesome! πŸ‘ look issue list leave comment things want work . See also development guidelines .","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"development-guidelines","dir":"","previous_headings":"","what":"Development guidelines","title":"Contributing to RGCCA","text":"try follow GitHub flow development. Fork repo clone computer. learn process, see guide. forked cloned project since worked , pull changes original repo clone using git pull upstream main. Open RStudio project file (.Rproj). Make changes: Write code. Test code (bonus points adding unit tests). Document code (see function documentation ). Check code devtools::check() aim 0 errors warnings. Commit push changes. Submit pull request.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Fabien Girka. Author. Etienne Camenen. Author. Caroline Peltier. Author. Arnaud Gloaguen. Author. Vincent Guillemot. Author. Laurent Le Brusquet. Thesis advisor. Arthur Tenenhaus. Author, thesis advisor, maintainer.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Girka F, Camenen E, Peltier C, Gloaguen , Guillemot V, Le Brusquet L, Tenenhaus (????). RGCCA: Regularized Sparse Generalized Canonical Correlation Analysis Multiblock Data. R package version 3.0.3, https://CRAN.R-project.org/package=RGCCA.","code":"@Manual{, title = {{RGCCA}: Regularized and Sparse Generalized Canonical Correlation Analysis for Multiblock Data}, author = {Fabien Girka and Etienne Camenen and Caroline Peltier and Arnaud Gloaguen and Vincent Guillemot and Laurent {Le Brusquet} and Arthur Tenenhaus}, note = {R package version 3.0.3}, url = {https://CRAN.R-project.org/package=RGCCA}, }"},{"path":[]},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"authors","dir":"","previous_headings":"","what":"Authors:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Fabien GIRKA, Etienne CAMENEN, Caroline PELTIER, Vincent GUILLEMOT, Arnaud GLOAGUEN, Laurent LE BRUSQUET, Arthur TENENHAUS","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"key-words","dir":"","previous_headings":"","what":"Key-words:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Regularized Generalized Canonical Correlation Analysis, multi-block data analysis","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"arthur.tenenhaus@centralesupelec.fr","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"short-description","dir":"","previous_headings":"","what":"Short description","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Performs multiblock component methods (PCA, CCA, PLS, MCOA, GCCA, CPCA, MAXVAR, R/SGCCA, etc.) produces graphical outputs (e.g.Β variables individuals plots) statistics assess robustness/significance analysis.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"contents","dir":"","previous_headings":"","what":"Contents","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Description Algorithm Installation Installation development branch git repository References","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"descriptiont","dir":"","previous_headings":"","what":"Descriptiont","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"package multiblock data analysis (RGCCA - Regularized Generalized Canonical Correlation Analysis) described [1-4]. software produces graphical outputs statistics assess robustness/significance analysis.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"algorithm","dir":"","previous_headings":"","what":"Algorithm","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"consider J data matrices X1, …, XJ. nβ€…Γ—β€…pj data matrix Xj = [xj1,…,xjpj] called block represents set pj variables observed n individuals. number nature variables may differ one block another, individuals must across blocks. assume variables centered. objective RGCCA find, block, weighted composite variables (called block component) yj = Xjaj,Β j = 1, ..., J (aj column-vector pj elements) summarizing relevant information within blocks. block components obtained () block components explain well block /(ii) block components assumed connected highly correlated. addition, RGCCA integrates variable selection procedure, called SGCCA, allowing identification relevant features. RGCCA subsumes fifty years multiblock component methods defined following optimization problem: $$\\underset{\\mathbf a_1, \\dots, \\mathbf a_J}{\\text{maximize}} \\sum_{j, k = 1}^J c_{jk} g(\\text{cov}(\\mathbf X_j \\mathbf a_j, \\mathbf X_k \\mathbf a_k)) \\text{ s.t. } (1 - \\tau_j)\\text{var}(\\mathbf X_j \\mathbf a_j) + \\tau_j \\Vert \\mathbf a_j \\Vert^2 = 1, ~ j = 1, \\dots, J.$$ scheme function g continuous convex function allows consider different optimization criteria. Typical choices g identity (horst scheme, leading maximizing sum covariances block components), absolute value (centroid scheme, yielding maximization sum absolute values covariances), square function (factorial scheme, thereby maximizing sum squared covariances), , generally, even integer m, g(x) = xm (m-scheme, maximizing power m sum covariances). horst scheme penalizes structural negative correlation block components centroid scheme m-scheme enable two components negatively correlated. According [5], fair model model blocks contribute equally solution opposition model dominated J sets. fairness major objective, user must choose m = 1. m > 1 preferable user wants discriminate blocks. practice, m equal 1, 2 4. higher value m method acts block selector [5]. design matrix C symmetric Jβ€…Γ—β€…J matrix nonnegative elements describing network connections blocks user wants take account. Usually, cjk = 1 two connected blocks 0 otherwise. Ο„j called shrinkage parameters regularization parameters ranging 0 1. Ο„j enables interpolate smoothly maximizing covariance maximizing correlation. Setting Ο„j 0 force block components unit variance (var(Xjaj) = 1). case, covariance criterion boils correlation. correlation criterion better explaining correlated structure across datasets, thus discarding variance within individual dataset. Setting Ο„j 1 normalize block weight vectors (β€–aj‖ = 1), applies covariance criterion. value 0 1 lead compromise two first options correspond following constraint (1βˆ’Ο„j)var(Xjaj)β€…+β€…Ο„jβ€–ajβ€–2 = 1. RGCCA package, block, determination shrinkage parameter can made fully automatic using analytical formula proposed (SchΓ€fer Strimmer 2005 [6]), permutation K fold cross-validation. Moreover, can define choice shrinkage parameters providing interpretations properties resulting block components: Ο„j = 1 yields maximization covariance-based criterion. recommended user wants stable component (large variance) simultaneously taking account correlations blocks. user must, however, aware variance dominates correlation. Ο„j = 0 yields maximization correlation-based criterion. recommended user wants maximize correlations connected components. option can yield unstable solutions case multi-collinearity used data block rank deficient (e.g.Β n < pj). 0 < τj < 1 good compromise variance correlation: block components simultaneously stable well correlated possible connected block components. setting can used data block rank deficient. quality interpretability RGCCA block components yj = Xjaj,Β j = 1, …, J likely affected usefulness relevance variables block. Accordingly, important issue identify within block subset significant variables active relationships blocks. SGCCA extends RGCCA address issue variable selection. Specifically, RGCCA Ο„j equal 1 combined L1-penalty gives rise SGCCA [3]. SGCCA optimization problem defined sj, user defined positive constant determines amount sparsity additional constraint β€–ajβ€–1 ≀ sj,Β j = 1, …, J. smaller sj, larger degree sparsity aj. sparsity parameter sj usually set cross-validation permutation. Alternatively, values sj can simply chosen result desired amounts sparsity.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Required: Software: R (β‰₯ 3.2.0) R libraries: see DESCRIPTION file. See vignette introduction package.","code":"install.packages(\"RGCCA\")"},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"installation-of-a-development-branch-from-the-git-repository","dir":"","previous_headings":"","what":"Installation of a development branch from the git repository","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Required: Software: R (β‰₯ 3.2.0) R libraries: see DESCRIPTION file. R library devtools.","code":"remove.packages(\"RGCCA\") devtools::install_github(repo=\"https://github.com/rgcca-factory/RGCCA.git\", ref = \"main\")"},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Tenenhaus, M., Tenenhaus, ., & Groenen, P. J. (2017). Regularized generalized canonical correlation analysis: framework sequential multiblock component methods. Psychometrika, 82(3), 737-777. Tenenhaus, ., Philippe, C., & Frouin, V. (2015). Kernel generalized canonical correlation analysis. Computational Statistics & Data Analysis, 90, 114-131. Tenenhaus, ., Philippe, C., Guillemot, V., Le Cao, K. ., Grill, J., & Frouin, V. (2014). Variable selection generalized canonical correlation analysis. Biostatistics, 15(3), 569-583. Tenenhaus, ., & Tenenhaus, M. (2011). Regularized generalized canonical correlation analysis. Psychometrika, 76(2), 257. Van de Geer, J. P. (1984). Linear relations among K sets variables. Psychometrika, 49(1), 79-94. SchΓ€fer, J., & Strimmer, K. (2005). shrinkage approach large-scale covariance matrix estimation implications functional genomics. Statistical applications genetics molecular biology, 4(1). Tenenhaus, ., & Tenenhaus, M. (2014). Regularized generalized canonical correlation analysis multiblock multigroup data analysis. European Journal operational research, 238(2), 391-403.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":null,"dir":"Reference","previous_headings":"","what":"European Customer Satisfaction Index β€” ECSI","title":"European Customer Satisfaction Index β€” ECSI","text":"European Consumer Satisfaction Index (ECSI) economic indicator measures customer satisfaction. ECSI adaptation Swedish Customer Satisfaction Barometer (Fornell, 1992) compatible American Customer Satisfaction Index. indicators describing latent variables given Mobile Phone Industry. original items scaled 1 10 transformed new normalized variables. minimum possible value variable 0 maximum possible value equal 10. IMAG Image phone provider (eta_1) () Reputation phone provider, (b) Trustworthiness, (c) Seriousness, (d) Solidness, (e) Caring customer's needs. EXPE Customer Expectations overall quality (eta_2) () Expectations overall quality \"mobile phone provider\" moment became customer provider, (b) Expectations \"mobile phone provider\" provide products services meet personal need, (c) often expect things go wrong \"mobile phone provider\". QUAL Perceived Quality (eta_3) () Overall perceived quality, (b) Overall perceived quality, (c) Customer service personal advice offered, (d) Quality services use, (e) Range services products offered, (f) Reliability accuracy products services provided, (g) Clarity transparency information provided. VAL Perceived Value (eta_4) () Given quality products services offered \"mobile phone provider\" rate fees prices pay ? (b) Given fees prices pay mobile phone provider rate quality products services offered \"mobile phone provider\"? SAT Customer Satisfaction (eta_5) () Overall satisfaction, (b) Fulfillment expectations, (c) well think \"mobile phone provider\" compares ideal \"mobile phone provider\"? LOY Customer Loyalty (eta_6) () need choose new \"mobile phone provider\" likely choose provider ? (b) Let us now suppose \"mobile phone provider\"s decide lower fees prices, \"mobile phone provider\" stays level today. level difference (%) choose another \"mobile phone provider\"? (c) friend colleague asks advice, likely recommend \"mobile phone provider\"?","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"European Customer Satisfaction Index β€” ECSI","text":"","code":"data(ECSI)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"European Customer Satisfaction Index β€” ECSI","text":"data frame 250 rows 24 variables","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"European Customer Satisfaction Index β€” ECSI","text":"Fornell C. (1992): national customer satisfaction barometer. Swedish experience. Journal Marketing, (56), 6-21.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":null,"dir":"Reference","previous_headings":"","what":"Russett data β€” Russett","title":"Russett data β€” Russett","text":"Russett data set (Russett, 1964) studied Gifi (1990). Three blocks variables defined 47 countries. first block related \"Agricultural Inequality\", second \"Industrial Development\", last one describes \"Political Instability\". Russett collected data study relationships Agricultural Inequality, Industrial Development Political Instability. Russett's hypotheses can formulated follows: difficult country escape dictatorship agricultural inequality -average industrial development -average. X1 Agricultural Inequality GINI: Inequality land distribution, FARM: Percentage farmers half land, RENT: Percentage farmers rent land. X2 Industrial Development GNPR: Gross national product per capita ($1955), LABO: Percentage labor forced employed agriculture. X3 Political Instability INST: Instability executive (45-61), ECKS: Number violent internal war incidents (46-61), DEAT: Number people killed result civic group violence (50-62), DEMOSTAB: Stable democracy, DEMOINST: Unstable democracy, DICTATOR: Dictatorship.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Russett data β€” Russett","text":"","code":"data(Russett)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Russett data β€” Russett","text":"data frame 47 rows 12 variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Russett data β€” Russett","text":"Russett B.M. (1964), Inequality Instability: Relation Land Tenure Politics, World Politics 16:3, 442-454. Gifi, . (1990), Nonlinear multivariate analysis, Chichester: Wiley.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Russett data β€” Russett","text":"","code":"#Loading of the Russett dataset data(Russett) #Russett is partitioned into three blocks (X_agric, X_ind, X_polit) X_agric <- Russett[, c(\"gini\", \"farm\", \"rent\")] X_ind <- Russett[, c(\"gnpr\", \"labo\")] X_polit <- Russett[, c(\"inst\", \"ecks\", \"death\", \"demostab\", \"demoinst\", \"dictator\")] A <- list(X_agric, X_ind, X_polit)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Available methods for RGCCA β€” available_methods","title":"Available methods for RGCCA β€” available_methods","text":"List methods can used rgcca function.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Available methods for RGCCA β€” available_methods","text":"","code":"available_methods()"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Available methods for RGCCA β€” available_methods","text":"vector methods implemented rgcca function.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Available methods for RGCCA β€” available_methods","text":"","code":"available_methods() #> [1] \"rgcca\" \"sgcca\" \"pca\" \"spca\" \"pls\" \"spls\" #> [7] \"cca\" \"ifa\" \"ra\" \"gcca\" \"maxvar\" \"maxvar-b\" #> [13] \"maxvar-a\" \"mfa\" \"mcia\" \"mcoa\" \"cpca-1\" \"cpca-2\" #> [19] \"cpca-4\" \"hpca\" \"maxbet-b\" \"maxbet\" \"maxdiff-b\" \"maxdiff\" #> [25] \"sabscor\" \"ssqcor\" \"ssqcov-1\" \"ssqcov-2\" \"ssqcov\" \"sumcor\" #> [31] \"sumcov-1\" \"sumcov-2\" \"sumcov\" \"sabscov-1\" \"sabscov-2\""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a fitted object from the RGCCA package β€” plot.rgcca","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"`plot.rgcca()` plots fitted RGCCA object. `plot.rgcca_cv()` plots fitted rgcca_cv object. Boxplots cross-validated scores different parameter sets displayed. `plot.rgcca_permutation()` plots fitted rgcca_permutation object. Permutation statistics displayed set parameters. `plot.rgcca_bootstrap()` plots fitted rgcca_bootstrap object. block variable shown along associated bootstrap confidence interval stars reflecting p-value assigning strictly positive negative weight block variable. `plot.rgcca_stability()` calls `plot.rgcca()` fitted RGCCA model returned `rgcca_stability()`.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"","code":"# S3 method for rgcca plot( x, type = \"weights\", block = seq_along(x$call$blocks), comp = c(1, 2), response = as.factor(rep(1, NROW(x$Y[[1]]))), display_order = TRUE, title = NULL, cex = 1, cex_sub = 12 * cex, cex_main = 14 * cex, cex_lab = 12 * cex, cex_point = 3 * cex, n_mark = 30, sample_colors = NULL, sample_shapes = NULL, var_colors = NULL, var_shapes = NULL, AVE_colors = NULL, show_sample_names = TRUE, show_var_names = TRUE, repel = FALSE, display_blocks = seq_along(x$call$blocks), expand = 1, show_arrows = TRUE, ... ) # S3 method for rgcca_cv plot( x, type = c(\"sd\", \"quantile\"), cex = 1, cex_main = 14 * cex, cex_sub = 12 * cex, cex_point = 3 * cex, cex_lab = 12 * cex, display_order = TRUE, ... ) # S3 method for rgcca_permutation plot( x, type = c(\"crit\", \"zstat\"), cex = 1, title = NULL, cex_main = 14 * cex, cex_sub = 12 * cex, cex_point = 3 * cex, cex_lab = 12 * cex, display_order = TRUE, show_legend = FALSE, ... ) # S3 method for rgcca_bootstrap plot( x, block = seq_along(x$rgcca$call$blocks), comp = 1, type = c(\"weights\", \"loadings\"), empirical = TRUE, n_mark = 30, display_order = TRUE, show_stars = TRUE, title = NULL, cex = 1, cex_sub = 12 * cex, cex_main = 14 * cex, cex_lab = 12 * cex, cex_point = 3 * cex, colors = NULL, adj.method = \"fdr\", ... ) # S3 method for rgcca_stability plot(x, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"x object plotted (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). type character string indicating type plot (see details). block numeric corresponding block(s) plot. comp numeric vector indicating component(s) consider. response vector coloring points \"samples\" plot. display_order logical value ordering variables. TRUE, variables ordered highest lowest absolute value. FALSE, block order used. Default TRUE. title string specifying title plot. cex numeric defining size objects plot. Default one. cex_sub numeric defining font size subtitle. Default 12 * cex. cex_main numeric defining font size title. Default 14 * cex. cex_lab numeric defining font size labels. Default 12 * cex. cex_point numeric defining font size points. Default 3 * cex. n_mark integer defining maximum number plotted objects (see details). sample_colors string specifying colors used color samples (used \"samples\" \"biplot\" plots). sample_shapes Shapes used sample points (used \"samples\" \"biplot\" plots). var_colors Colors used color variable weights correlations canonical components (used \"weights\", \"loadings\", \"cor_circle\" \"biplot\" plots). var_shapes Shapes used points associated variable weights correlations canonical components (used \"cor_circle\" \"biplot\" plots). AVE_colors Colors used AVE plot. show_sample_names logical value showing sample names plots \"samples\" \"biplot\". show_var_names logical value showing variable names plots \"cor_circle\" \"biplot\". repel logical value repelling text labels . Default FALSE. display_blocks numeric corresponding block(s) display correlation_circle. blocks displayed default. expand numeric scales weights associated block variables biplot. Default 1. show_arrows logical, TRUE, arrows shown biplot. Default FALSE. ... Additional graphical parameters. show_legend logical value indicating legend shown (default FALSE). empirical logical value indicating bootstrap confidence intervals p-values derived empirical distribution. (default: TRUE) show_stars logical value indicating significance levels displayed. colors Colors used plots. adj.method string indicating method used adjust p-values. must method handled p.adjust function. Default \"fdr\".","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"ggplot2 plot object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"Argument type can take 7 values `plot.rgcca`: \"weights\" (default): barplot block weight vectors one specific block/component. Sorting applied according display_order argument. number displayed weights can set n_marks. \"loadings\": barplot block-loading vectors. Sorting applied according display_order argument. number displayed loadings can set n_marks. \"samples\": scatter plot block components. blocks used defined block argument, components comp argument (Y[[block[1]]][, comp[1]], Y[[block[2]]][,comp[2]]). Points can colored according response argument. \"cor_circle\" correlation circle. represents correlation block component corresponding first element block argument, variables block corresponding blocks specified argument display_blocks. \"\": displays sample plot correlation circle (implemented one block least two components extracted (ncomp >= 2). \"biplot\": displays plot scatter plot block components variables used compute block components. \"ave\": displays average variance explained block. Argument type can take 2 values `plot.rgcca_cv`: \"sd\" (default): middle bar boxplots corresponds mean limits given mean plus minus standard deviation. \"quantile\": middle bar corresponds median limits boxes given 25% 75% quantiles. Argument type can take 2 values `plot.rgcca_permutation`: \"crit\" (default): RGCCA criterion permuted permuted datasets displayed set parameters. \"zstat\": Z-score displayed set parameters. Argument type can take 2 values `plot.rgcca_bootstrap`: \"weights\" (default): statistics block-weight vectors displayed. \"loadings\": statistics block-loading vectors displayed.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"","code":"## Plotting of an rgcca object data(\"Russett\") blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = as.factor(apply(Russett[, 9:11], 1, which.max)) ) blocks2 <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) status <- colnames(Russett)[9:11][apply(Russett[, 9:11], 1, which.max)] fit_rgcca <- rgcca(blocks = blocks, response = 3, ncomp = 2) plot(fit_rgcca, type = \"sample\", block = 1:2, comp = 1) plot(fit_rgcca, type = \"loadings\") plot(fit_rgcca, type = \"weight\") plot(fit_rgcca, type = \"sample\") plot(fit_rgcca, type = \"cor_circle\") plot(fit_rgcca, type = \"both\") plot(fit_rgcca, type = \"biplot\") plot(fit_rgcca, type = \"ave\") if (FALSE) { # With a superblock fit_mcoa <- rgcca(blocks = blocks2, method = \"mcoa\", ncomp = 2) plot(fit_mcoa, type = \"both\", response = status) plot(fit_mcoa, type = \"biplot\", response = status) ## Plotting of an rgcca_cv object cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = 1, n_run = 1, n_cores = 1, prediction_model = \"lda\", metric = \"Accuracy\", verbose = TRUE ) plot(cv_out, type = \"sd\") plot(cv_out, type = \"quantile\") ## Ploting of an rgcca_permutation object perm_out <- rgcca_permutation(blocks2, par_type = \"tau\", n_perms = 2, n_cores = 1) plot(perm_out, type = \"crit\") plot(perm_out, type = \"zstat\") ## Plotting of an rgcca_bootstrap object boot_out <- rgcca_bootstrap(fit_rgcca, n_boot = 20, n_cores = 1) plot(boot_out, type = \"weights\", block = 1, comp = 1) plot(boot_out, type = \"loadings\", comp = 2, display_order = FALSE, show_stars = FALSE) ## Plotting of an rgcca_stability object fit.sgcca <- rgcca(blocks2, sparsity = c(.8, .9, .6)) res <- rgcca_stability( fit.sgcca, n_boot = 10, verbose = TRUE, keep = rep(.1, 3) ) plot(res, type = \"samples\") }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a fitted object from the RGCCA package β€” print.rgcca","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"`print.rgcca()` prints fitted RGCCA object. method number components displayed. `print.rgcca_cv()` prints rgcca_cv object. type validation, number tried parameter sets, type task, model used displayed. `print.rgcca_permutation()` prints rgcca_permutation object. number permutations tried parameter sets displayed. `print.rgcca_bootstrap()` prints rgcca_bootstrap object. number boostrap samples used fitting displayed. `print.rgcca_stability()` prints rgcca_stability object. number boostrap samples used fitting displayed.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"","code":"# S3 method for rgcca print(x, ...) # S3 method for rgcca_cv print(x, ...) # S3 method for rgcca_permutation print(x, ...) # S3 method for rgcca_bootstrap print(x, ...) # S3 method for rgcca_stability print(x, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"x object printed (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). ... arguments passed methods.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"none","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"","code":"## Printing of an rgcca object data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) res <- rgcca(blocks, connection = C, ncomp = rep(2, 3), tau = c(1, 1, 1), scheme = \"factorial\", scale = TRUE, verbose = FALSE ) print(res) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point: #> \t- After 2 iterations for component 1. #> \t- After 6 iterations for component 2. ## Printing of an rgcca_cv object res <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0, 0.2, 0.3), n_run = 1, n_cores = 1, verbose = TRUE ) print(res) #> RGCCA cross-validation object obtained with 10 sets of parameters using 5 folds. #> Regression was performed using lm model. ## Printing of an rgcca_permutation object perm.out <- rgcca_permutation(blocks, par_type = \"tau\", n_perms = 5, n_cores = 1, verbose = TRUE ) print(perm.out) #> RGCCA permutation object obtained with 10 sets of parameters and 5 permutations each. ## Printing of an rgcca_bootstrap object fit.rgcca <- rgcca(blocks, ncomp = c(2, 1, 2)) boot.out <- rgcca_bootstrap(fit.rgcca, n_boot = 20, n_cores = 2, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(boot.out) #> RGCCA bootstrap object obtained with 20 bootstrap samples. ## Printing of an rgcca_stability object fit.sgcca <- rgcca(blocks, sparsity = c(.8, .9, .6)) res <- rgcca_stability(fit.sgcca, n_boot = 10, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(res) #> RGCCA stability object obtained with 10 bootstrap samples."},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":null,"dir":"Reference","previous_headings":"","what":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"RGCCA general statistical framework multiblock data analysis. rgcca() function implements framework main entry point package.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"","code":"rgcca( blocks, connection = NULL, tau = 1, ncomp = 1, scheme = \"factorial\", scale = TRUE, init = \"svd\", bias = TRUE, tol = 1e-08, verbose = FALSE, scale_block = \"inertia\", method = \"rgcca\", sparsity = 1, response = NULL, superblock = FALSE, NA_method = \"na.ignore\", quiet = TRUE, n_iter_max = 1000, comp_orth = TRUE, A = NULL, C = NULL )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. connection (\\(J \\times J\\)) symmetric matrix describing network connections blocks (default value: 1-diag(J)). tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. scale logical value indicating variables standardized. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). tol stopping value convergence algorithm (default: tol = 1e-08). verbose logical value indicating progress algorithm reported computing. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. method string specifying multiblock component method consider. Possible values found using available_methods. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. response numerical value giving position response block. response argument filled, supervised mode automatically activated. superblock logical value indicating superblock option used. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). quiet logical value indicating diagnostic messages reported. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors. Deprecated argument, please use blocks instead. C Deprecated argument, please use connection instead.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"fitted rgcca object. Y list \\(J\\) elements. jth element list \\(Y\\) matrix contains block components block j. list \\(J\\) elements. jth element list \\(\\) matrix contains block weight vectors block j. astar list \\(J\\) elements. column astar[[j]] vector Y[[j]] = blocks[[j]] %*% astar[[j]]. crit list vector length max(ncomp). vector list related one specific deflation stage reports values criterion stage across iterations. primal_dual vector length J. Element \\(j\\) either \"primal\" \"dual\", depending whether primal dual RGCCA algorithm used block \\(j\\). AVE list numerical values giving indicators model quality based Average Variance Explained (AVE): AVE(block), AVE(outer model), AVE(inner model). optimal logical value indicating Schaffer Strimmer formula applied estimating optimal tau parameters. opt list containing options fitted RGCCA object. call Call function. blocks list contains \\(J\\) blocks variables \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\). Block \\(\\mathbf X_j\\) matrix dimension \\(n \\times p_j\\) \\(p_j\\) number variables \\(\\mathbf X_j\\). blocks preprocessed according values scale/scale_block/NA_method.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"Given \\(J\\) data matrices \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\) represent \\(J\\) sets variables observed set \\(n\\) individuals. matrices \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\), called blocks must number rows, may (usually ) different numbers columns. RGCCA aims study relationships \\(J\\) blocks. constitutes general framework many multi-block component methods (see Tenenhaus Tenenhaus, 2011 ; Tenenhaus et al. 2017). combines power multi-block data analysis methods (maximization well identified criteria) flexibility PLS path modeling (researcher decides blocks connected ). Hence, use RGCCA requires construction (user specified) design matrix \\(\\mathbf C\\) characterizes connections blocks. Elements (symmetric) design matrix \\(\\mathbf C = (c_{jk})\\) positive (usually equal 1 blocks \\(j\\) \\(k\\) connected, 0 otherwise). rgcca() function implements monotone global convergent algorithm: bounded criteria maximized increases step iterative procedure hits, convergence, stationary point RGCCA optimization problem. Moreover, tau argument used, depending dimensionality block \\(\\mathbf X_j, j = 1, \\ldots, J\\), primal algorithm (\\(n \\geq p_j\\)) dual algorithm (\\(n < p_j\\)) used (see Tenenhaus et al. 2015). sparsity specified SGCCA, extends RGCCA address issue variable selection (Tenenhaus et al, 2014). Specifically, RGCCA combined L1-penalty gives rise Sparse GCCA (SGCCA). SGCCA algorithm similar RGCCA algorithm keeps convergence properties (.e. bounded criteria maximized increases step iterative procedure hits convergence stationary point). last, deflation strategy can used compute several block components (specified ncomp) per block. Within block, components weight vectors guaranteed orthogonal. noted numbers components per block can differ one block another. rgcca() function handle missing values (punctual blockwise missing structure) using algorithm described (Tenenhaus et al, 2005). Guidelines describing use RGCCA practice provided (Garali et al., 2018).","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"Garali , Adanyeguh IM, Ichou F, Perlbarg V, Seyer , Colsch B, Moszer , Guillemot V, Durr , Mochel F, Tenenhaus . (2018) strategy multimodal data integration: application biomarkers identification spinocerebellar ataxia. Briefings Bioinformatics. 19(6):1356-1369. Tenenhaus M., Tenenhaus . Groenen P. J. (2017). Regularized generalized canonical correlation analysis: framework sequential multiblock component methods. Psychometrika, 82(3), 737-777. Tenenhaus ., Philippe C. Frouin, V. (2015). Kernel generalized canonical correlation analysis. Computational Statistics Data Analysis, 90, 114-131. Tenenhaus ., Philippe C., Guillemot V., Le Cao K. ., Grill J. Frouin, V. (2014), Variable selection generalized canonical correlation analysis, Biostatistics, 15(3), pp. 569-583. Tenenhaus . Tenenhaus M., (2011). Regularized Generalized Canonical Correlation Analysis, Psychometrika, 76(2), pp 257-284. Tenenhaus, M., Vinzi, V. E., Chatelin, Y. M., & Lauro, C. (2005). PLS path modeling. Computational statistics & data analysis, 48(1), 159-205. Schafer J. Strimmer K. (2005). shrinkage approach large-scale covariance matrix estimation implications functional genomics. Statistical Applications Genetics Molecular Biology 4:32. Arnaud Gloaguen, Vincent Guillemot, Arthur Tenenhaus. efficient algorithm satisfy l1 l2 constraints. 49emes Journees de Statistique, May 2017, Avignon, France. (hal-01630744)","code":""},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"","code":"#################### # Example 1: RGCCA # #################### # Create the dataset data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) politic <- as.factor(apply(Russett[, 9:11], 1, which.max)) # RGCCA with default values : Blocks are fully connected, factorial scheme # tau = 1 for all blocks, one component per block. fit_rgcca <- rgcca(blocks = blocks) print(fit_rgcca) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point after 3 iterations. plot(fit_rgcca, type = \"weight\", block = 1:3) plot(fit_rgcca, type = \"sample\", block = 1:2, comp = rep(1, 2), resp = politic ) ############################################ # Example 2: RGCCA and multiple components # ############################################ # By default rgcca() returns orthogonal block components. fit_rgcca <- rgcca(blocks, method = \"rgcca\", connection = 1 - diag(3), superblock = FALSE, tau = rep(1, 3), ncomp = c(2, 2, 2), scheme = \"factorial\", comp_orth = TRUE, verbose = TRUE ) #> Computation of the RGCCA block components based on the factorial scheme #> Shrinkage intensity parameters are chosen manually #> Computation of the RGCCA block components #1 is under progress... #> Iter: 1 Fit: 0.71713961 Dif: 0.06767066 #> Iter: 2 Fit: 0.71721572 Dif: 0.00007611 #> Iter: 3 Fit: 0.71721585 Dif: 0.00000013 #> Iter: 4 Fit: 0.71721585 Dif: 0.00000000 #> The RGCCA algorithm converged to a stationary point after 3 iterations #> Computation of the RGCCA block components #2 is under progress... #> Iter: 1 Fit: 0.02960087 Dif: 0.01358225 #> Iter: 2 Fit: 0.02985623 Dif: 0.00025536 #> Iter: 3 Fit: 0.02985666 Dif: 0.00000043 #> Iter: 4 Fit: 0.02985666 Dif: 0.00000000 #> The RGCCA algorithm converged to a stationary point after 3 iterations print(fit_rgcca) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point: #> \t- After 3 iterations for component 1. #> \t- After 3 iterations for component 2. plot(fit_rgcca, type = \"sample\", block = 1, comp = 1:2, resp = politic ) plot(fit_rgcca, type = \"weight\", block = 1:3, display_order = FALSE) ############################## # Example 3: MCOA with RGCCA # ############################## fit_rgcca <- rgcca(blocks, method = \"mcoa\", ncomp = 2) print(fit_rgcca) #> Fitted MCOA model. #> The algorithm converged to a stationnary point: #> \t- After 1 iterations for component 1. #> \t- After 1 iterations for component 2. # biplot representation plot(fit_rgcca, type = \"biplot\", block = 4, resp = politic) if (FALSE) { #################################### # Example 4: RGCCA and permutation # #################################### # Tune the model to find the best set of tau parameters. # By default, blocks are fully connected. set.seed(27) #favorite number perm_out <- rgcca_permutation(blocks, n_cores = 1, par_type = \"tau\", n_perms = 50 ) print(perm_out) plot(perm_out) # all the parameters were imported from a fitted permutation object fit_rgcca <- rgcca(perm_out) print(fit_rgcca) ####################################### # Example 5: RGCCA and dual algorithm # ####################################### # Download the dataset's package at http://biodev.cea.fr/sgcca/ and install # it from the package archive file. # You can do it with the following R commands: if (!(\"gliomaData\" %in% rownames(installed.packages()))) { destfile <- tempfile() download.file( \"http://biodev.cea.fr/sgcca/gliomaData_0.4.tar.gz\", destfile ) install.packages(destfile, repos = NULL, type = \"source\") } data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc sapply(blocks, NCOL) # rgcca algorithm using the dual formulation for X1 and X2 # and the dual formulation for X3. X3 is the group coding matrix associated # with the qualitative variable Loc. This block is considered # as response block and specified using the argument response. fit_rgcca <- rgcca( blocks = blocks, response = 3, method = \"rgcca\", tau = c(1, 1, 0), ncomp = 1, scheme = function(x) x^2, #factorial scheme, verbose = TRUE, ) fit_rgcca$primal_dual print(fit_rgcca) ########################################### # Example 6: RGCCA and variable selection # ########################################### # Variable selection and RGCCA : the sgcca algorithm fit_sgcca <- rgcca( blocks = blocks, method = \"sgcca\", response = 3, sparsity = c(.071, .2, 1), ncomp = 1, scheme = \"factorial\", verbose = TRUE, ) print(fit_sgcca) ############################################ # Example 7: RGCCA, multiple components # # and different penalties per component # ############################################ # S/RGCCA algorithm with multiple components and different # penalties for each components (-> sparsity is a matrix) fit_rgcca <- rgcca(blocks, response = 3, tau = matrix(c(.5, .5, 0, 1, 1, 0), nrow = 2, byrow = TRUE), ncomp = c(2, 2, 1), scheme = \"factorial\") print(fit_rgcca) # the same applies for SGCCA fit_sgcca <- rgcca(blocks, response = 3, sparsity = matrix(c(.071, 0.2, 1, 0.06, 0.15, 1), nrow = 2, byrow = TRUE), ncomp = c(2, 2, 1), scheme = \"factorial\") print(fit_sgcca) ################################################## # Example 8: Supervised mode en cross validation # ################################################## # Prediction of the location from GE and CGH # Tune sparsity values based on the cross-validated accuracy. set.seed(27) #favorite number cv_out <- rgcca_cv(blocks, response = 3, par_type = \"sparsity\", par_length = 10, ncomp = 1, prediction_model = \"lda\", metric = \"Accuracy\", k = 3, n_run = 5, n_cores = 2) print(cv_out) plot(cv_out, display_order = TRUE) # all the parameters were imported from the fitted cval object. fit_rgcca <- rgcca(cv_out) print(fit_rgcca) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"Bootstrap confidence intervals p-values evaluating significance/stability block-weight vectors produced S/RGCCA.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"","code":"rgcca_bootstrap( rgcca_res, n_boot = 100, n_cores = 1, balanced = TRUE, keep_all_variables = FALSE, verbose = TRUE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"rgcca_res fitted RGCCA object (see rgcca). n_boot number bootstrap samples (default: 100). n_cores number cores used parallelization. balanced logical value indicating balanced bootstrap procedure performed (default TRUE). keep_all_variables logical value indicating variables kept even null variance least one bootstrap sample (default FALSE). verbose logical value indicating progress bootstrap procedure reported.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"rgcca_bootstrap object can printed plotted. n_boot number bootstrap samples, returned use. rgcca RGCCA object fitted original data. bootstrap data.frame block weight vectors loadings computed bootstrap sample. stats data.frame statistics summarizing bootstrap data.frame.","code":""},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"","code":"# Bootstrap confidence intervals and p-values for RGCCA data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) fit_rgcca <- rgcca(blocks, ncomp = 1) boot_out <- rgcca_bootstrap(fit_rgcca, n_boot = 20, n_cores = 1, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(boot_out) #> RGCCA bootstrap object obtained with 20 bootstrap samples. plot(boot_out, type = \"weight\", block = 1:3, comp = 1, display_order = FALSE) if (FALSE) { # Download the dataset's package at http://biodev.cea.fr/sgcca/ and install # it from the package archive file. # You can do it with the following R commands: if (!(\"gliomaData\" %in% rownames(installed.packages()))) { destfile <- tempfile() download.file( \"http://biodev.cea.fr/sgcca/gliomaData_0.4.tar.gz\", destfile ) install.packages(destfile, repos = NULL, type = \"source\") } data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks [[3]] <- Loc fit_sgcca <- rgcca(blocks, response = 3, sparsity = c(.071, .2, 1), ncomp = 1, scheme = \"factorial\", verbose = TRUE ) print(fit_sgcca) boot_out <- rgcca_bootstrap(fit_sgcca, n_boot = 50, n_cores = 2) plot(boot_out, block = 1:2, type = \"weight\", comp = 1, n_mark = 300000, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":null,"dir":"Reference","previous_headings":"","what":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"function used select automatically \"sparsity\", \"tau\" \"ncomp\" cross-validation. function applies supervised setting, filling response argument therefore mandatory.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"","code":"rgcca_cv( blocks, method = \"rgcca\", response = NULL, par_type = \"tau\", par_value = NULL, par_length = 10, validation = \"kfold\", prediction_model = \"lm\", metric = NULL, k = 5, n_run = 1, n_cores = 1, quiet = TRUE, superblock = FALSE, scale = TRUE, scale_block = TRUE, tol = 1e-08, scheme = \"factorial\", NA_method = \"na.ignore\", rgcca_res = NULL, tau = 1, ncomp = 1, sparsity = 1, init = \"svd\", bias = TRUE, verbose = TRUE, n_iter_max = 1000, comp_orth = TRUE, ... )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. method string specifying multiblock component method consider. Possible values found using available_methods. response numerical value giving position response block. response argument filled, supervised mode automatically activated. par_type character giving parameter tune among \"sparsity\", \"tau\" \"ncomp\". par_value parameter values tested, either NULL, numerical vector size \\(J\\), matrix size par_length \\(\\times J\\). par_value NULL, par_length sets parameters generated uniformly minimum maximum possible values parameter defined par_type block. Minimum possible values 0 tau, \\(1/\\textrm{sqrt}(p_j)\\) sparsity, 1 ncomp. Maximum possible values 1 tau sparsity, \\(p_j\\) ncomp. par_value vector, overwrites maximum values taken range generated parameters. par_value matrix, par_value directly corresponds set tested parameters. par_length integer indicating number sets candidate parameters tested (par_value matrix). validation string specifying type validation among \"loo\" \"kfold\". small datasets (e.g. <30 samples), recommended use loo (leave-one-) procedure. prediction_model string giving model used prediction. Please see caret::modelLookup() list available models. metric string indicating metric interest. one following scores: classification: \"Accuracy\", \"Kappa\", \"F1\", \"Sensitivity\", \"Specificity\", \"Pos_Pred_Value\", \"Neg_Pred_Value\", \"Precision\", \"Recall\", \"Detection_Rate\", \"Balanced_Accuracy\". regression: \"RMSE\", \"MAE\". k integer giving number folds (validation = 'kfold'). n_run integer giving number Monte-Carlo Cross-Validation (MCCV) run (validation = 'kfold'). n_cores number cores used parallelization. quiet logical value indicating diagnostic messages reported. superblock logical value indicating superblock option used. scale logical value indicating variables standardized. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. tol stopping value convergence algorithm (default: tol = 1e-08). scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). rgcca_res fitted RGCCA object (see rgcca). tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). verbose logical value indicating progress algorithm reported computing. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors. ... Additional parameters passed prediction_model.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"rgcca_cv object can printed plotted. k integer giving number folds. n_run integer giving number MCCV. opt list containing options RGCCA model. metric string indicating metric used process cross-validation. cv matrix dimension par_length x (k x n_run). row cv corresponds one set candidate parameters. column cv corresponds cross-validated score specific fold specific run. call list input parameters RGCCA model. par_type type parameter tuned (either \"tau\", \"sparsity\", \"ncomp\"). best_params set parameters yields best cross-validated scores. params matrix reporting sets candidate parameters used cross-validation process. validation string specifying type validation (either \"loo\" \"kfold\"). stats data.frame containing various statistics (mean, sd, median, first quartile, third quartile) cross-validated score set parameters tested. classification boolean indicating model performs classification task. prediction_model string giving model used prediction.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"response block univariate. RGCCA components block used input variables predictive model (specified \"prediction_model\") predict response block. best combination parameters one best cross-validated score. multivariate response block, RGCCA components block used input variables predictive models (specified \"prediction_model\") predict column response block. cross-validated scores model averaged. best combination parameters one best averaged cross-validated score.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"","code":"# Cross_validation for classification set.seed(27) #favorite number data(Russett) blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = as.factor(apply(Russett[, 9:11], 1, which.max)) ) cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_length = 5, prediction_model = \"lda\", #caret::modelLookup() metric = \"Accuracy\", k=3, n_run = 3, verbose = TRUE) print(cv_out) #> RGCCA cross-validation object obtained with 5 sets of parameters using 3 folds. #> Classification was performed using lda model. plot(cv_out) # A fitted cval object is given as output of the rgcca() function fit_opt = rgcca(cv_out) if (FALSE) { # Cross_validation for regression set.seed(27) #favorite number data(Russett) blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:8] ) cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0.6, 0.75, 0.8), prediction_model = \"lm\", #caret::modelLookup() metric = \"RMSE\", k=3, n_run = 5, verbose = TRUE) print(cv_out) plot(cv_out) fit_opt = rgcca(cv_out) data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc set.seed(27) # favorite number cv_out = rgcca_cv(blocks, response = 3, ncomp = 1, prediction_model = \"glmnet\", family = \"multinomial\", lambda = .001, par_type = \"sparsity\", par_value = c(.071, .2, 1), metric = \"Balanced_Accuracy\", n_cores = 2, ) print(cv_out) plot(cv_out, display_order = FALSE) cv_out = rgcca_cv(blocks, response = 3, ncomp = 1, prediction_model = \"glmnet\", family = \"multinomial\", lambda = .001, par_type = \"ncomp\", par_value = c(5, 5, 1), metric = \"Balanced_Accuracy\", n_cores = 2, ) print(cv_out) plot(cv_out, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"function can used automatically select hyper-parameters (amount sparsity sgcca shrinkage parameters RGCCA). permutation-based strategy similar one proposed (Witten et al, 2009) implemented.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"","code":"rgcca_permutation( blocks, par_type = \"tau\", par_value = NULL, par_length = 10, n_perms = 20, n_cores = 1, quiet = TRUE, scale = TRUE, scale_block = TRUE, method = \"rgcca\", connection = NULL, scheme = \"factorial\", ncomp = 1, tau = 1, sparsity = 1, init = \"svd\", bias = TRUE, tol = 1e-08, response = NULL, superblock = FALSE, NA_method = \"na.ignore\", rgcca_res = NULL, verbose = TRUE, n_iter_max = 1000, comp_orth = TRUE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. par_type character giving parameter tune among \"sparsity\", \"tau\" \"ncomp\". par_value parameter values tested, either NULL, numerical vector size \\(J\\), matrix size par_length \\(\\times J\\). par_value NULL, par_length sets parameters generated uniformly minimum maximum possible values parameter defined par_type block. Minimum possible values 0 tau, \\(1/\\textrm{sqrt}(p_j)\\) sparsity, 1 ncomp. Maximum possible values 1 tau sparsity, \\(p_j\\) ncomp. par_value vector, overwrites maximum values taken range generated parameters. par_value matrix, par_value directly corresponds set tested parameters. par_length integer indicating number sets candidate parameters tested (par_value matrix). n_perms number permutations set parameters (default 20). n_cores number cores used parallelization. quiet logical value indicating diagnostic messages reported. scale logical value indicating variables standardized. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. method string specifying multiblock component method consider. Possible values found using available_methods. connection (\\(J \\times J\\)) symmetric matrix describing network connections blocks (default value: 1-diag(J)). scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). tol stopping value convergence algorithm (default: tol = 1e-08). response numerical value giving position response block. response argument filled, supervised mode automatically activated. superblock logical value indicating superblock option used. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). rgcca_res fitted RGCCA object (see rgcca). verbose logical value indicating progress permutation procedure reported. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"rgcca_permutation object can printed plotted. opt list indicating options RGCCA model used permutation. call list containing input parameters RGCCA model. par_type type parameter tuned (either \"tau\", \"sparsity\", \"ncomp\"). n_perms number permutations set candidate tuning parameters. best_params set tuning parameters yields highest Z-statistic. permcrit matrix permuted S/RGCCA criteria. ith row permcrit contains n_perms values S/RGCCA permuted criteria obtained ith set tuning parameters. params matrix reporting sets candidate parameters used permutation process. stats data.frame containing columns: sets candidate parameters, corresponding non permuted criteria, means standard deviations permuted criteria, Z-statistics p-values.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"tuning parameters selected using permutation scheme proposed (Witten et al, 2009). candidate tuning parameter value, following performed: (1) Repeat following n_perms times (n_perms large): () Randomly permuted rows \\(X_1\\),..., \\(X_J\\) create new blocks: \\(X_1^*\\),..., \\(X_J^*\\). (b) Run S/RGCCA permuted blocks \\(X_1^*\\),..., \\(X_J^*\\). (c) Record S/RGCCA criterion \\(t^*\\). (2) Run S/RGCCA original blocks \\(X_1\\),..., \\(X_J\\). (3) Record S/RGCCA criterion \\(t\\). (4) resulting p-value given \\(\\textrm{mean}(t^* > t)\\); , fraction \\(t^*\\) exceeds value \\(t\\) obtained real data. (5) resulting zstat defined \\(\\frac{t-\\textrm{mean}(t^*)}{\\textrm{sd}(t^*)}\\). , choose tuning parameter values gives highest value Step 5.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"Witten, D. M., Tibshirani, R., & Hastie, T. (2009). penalized matrix decomposition, applications sparse principal components canonical correlation analysis. Biostatistics, 10(3), 515-534.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"","code":"#################################### # Permutation based strategy for # # determining the best shrinkage # # parameters (par_type = \"tau\") # #################################### data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) C <- matrix(c( 0, 0, 1, 0, 0, 1, 1, 1, 0 ), 3, 3) # default value: 10 vectors from rep(0, length(blocks)) # to rep(1, length(blocks)), uniformly distributed. fit <- rgcca_permutation(blocks, connection = C, par_type = \"tau\", par_length = 10, n_perms = 2, n_cores = 1, verbose = TRUE ) print(fit) #> RGCCA permutation object obtained with 10 sets of parameters and 2 permutations each. plot(fit) fit$best_params #> agriculture industry politic #> 1 1 1 if (FALSE) { # It is possible to define explicitly K combinations of shrinkage # parameters to be tested and in that case a matrix of dimension KxJ is # required. Each row of this matrix corresponds to one specific set of # shrinkage parameters. par_value <- matrix(c( 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, sapply(blocks, RGCCA:::tau.estimate), 1, 1, 1 ), 5, 3, byrow = TRUE) perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"tau\", par_value = par_value, n_perms = 5, n_cores = 1 ) print(perm.out) plot(perm.out) # with superblock perm.out <- rgcca_permutation(blocks, par_type = \"tau\", superblock = TRUE, scale = TRUE, scale_block = FALSE, n_perms = 5, n_cores = 1 ) print(perm.out) plot(perm.out) # used a fitted rgcca_permutation object as input of the rgcca function fit.rgcca <- rgcca(perm.out) print(fit.rgcca) ###################################### # Permutation based strategy for # # determining the best sparsity # # parameters (par_type = \"sparsity\") # ###################################### # defaut value: 10 vectors from minimum values # (1/sqrt(ncol(X1)), ..., 1/sqrt(ncol(XJ)) # to rep(1, J), uniformly distributed. perm.out <- rgcca_permutation(blocks, par_type = \"sparsity\", n_perms = 50, n_cores = 1 ) print(perm.out) plot(perm.out) perm.out$best_params # when par_value is a vector of length J. Each element of the vector # indicates the maximum value of sparsity to be considered for each block. # par_length (default value = 10) vectors from minimum values # (1/sqrt(ncol(X1)), ..., 1/sqrt(ncol(XJ)) to maximum values, uniformly # distributed, are then considered. perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"sparsity\", par_value = c(0.6, 0.75, 0.5), par_length = 7, n_perms = 20, n_cores = 1, tol = 1e-3 ) print(perm.out) plot(perm.out) perm.out$best_params # when par_value is a scalar, the same maximum value is applied # for each block perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"sparsity\", par_value = 0.8, par_length = 5, n_perms = 10, n_cores = 1 ) perm.out$params ###################################### # Speed up the permutation procedure # ###################################### # The rgcca_permutation function can be quite time-consuming. Since # approximate estimates of the block weight vectors are acceptable in this # case, it is possible to reduce the value of the tolerance (tol argument) # of the RGCCA algorithm to speed up the permutation procedure. # data(\"ge_cgh_locIGR\", package = \"gliomaData\") A <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) A[[3]] <- A[[3]][, -3] C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) # check dimensions of the blocks sapply(A, dim) par_value <- matrix(c( seq(0.1, 1, by = 0.1), seq(0.1, 1, by = 0.1), rep(0, 10) ), 10, 3, byrow = FALSE) fit <- rgcca_permutation(A, connection = C, par_type = \"tau\", par_value = par_value, par_length = 10, n_perms = 10, n_cores = 1, tol = 1e-2 ) print(fit) plot(fit) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Make predictions using RGCCA β€” rgcca_predict","title":"Make predictions using RGCCA β€” rgcca_predict","text":"function aims make predictions combining fitted RGCCA object prediction model classification regression.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make predictions using RGCCA β€” rgcca_predict","text":"","code":"rgcca_predict( rgcca_res, blocks_test = rgcca_res$call$blocks, prediction_model = \"lm\", metric = NULL, ... )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make predictions using RGCCA β€” rgcca_predict","text":"rgcca_res fitted RGCCA object (see rgcca). blocks_test list test blocks aim predict associated response block. test response block present among blocks_test, metrics computed comparing predictions true values. prediction_model string giving model used prediction. Please see caret::modelLookup() list available models. metric string indicating metric interest. one following scores: classification: \"Accuracy\", \"Kappa\", \"F1\", \"Sensitivity\", \"Specificity\", \"Pos_Pred_Value\", \"Neg_Pred_Value\", \"Precision\", \"Recall\", \"Detection_Rate\", \"Balanced_Accuracy\". regression: \"RMSE\", \"MAE\". ... Additional parameters passed prediction_model.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make predictions using RGCCA β€” rgcca_predict","text":"list containing following elements: score score obtained testing block. NA test block missing. model list models trained using caret make predictions compute scores. metric list data.frames containing scores obtained training testing sets. confusion list containing NA regression tasks. Otherwise, confusion summary produced caret train test. projection list matrices containing projections test blocks using canonical components fitted RGCCA object. response block projected. prediction list data.frames predictions test train response blocks.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make predictions using RGCCA β€” rgcca_predict","text":"","code":"data(\"Russett\") blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:8] ) X_train <- lapply(blocks, function(x) x[seq(1, 30), ]) X_test <- lapply(blocks, function(x) x[seq(31, 47), ]) fit <- rgcca(X_train, tau = 1, ncomp = c(3, 2, 3), response = 3 ) res <- rgcca_predict(fit, X_test)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the most stable variables with SGCCA β€” rgcca_stability","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"function can used identify stable variables identified relevant SGCCA. Variable Importance Projection (VIP) based criterion used identify stable variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"","code":"rgcca_stability( rgcca_res, keep = vapply(rgcca_res$a, function(x) mean(x != 0), FUN.VALUE = 1), n_boot = 100, n_cores = 1, verbose = TRUE, balanced = TRUE, keep_all_variables = FALSE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"rgcca_res fitted RGCCA object (see rgcca). keep numeric vector indicating proportion variables per block select. n_boot number bootstrap samples (default: 100). n_cores number cores parallelization. verbose logical value indicating progress procedure reported. balanced logical value indicating balanced bootstrap procedure performed (default TRUE). keep_all_variables logical value indicating variables kept even null variance least one bootstrap sample (default FALSE).","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"rgcca_stability object can printed plotted. top data.frame giving indicator (VIP) variables ranked. n_boot number bootstrap samples, returned use. keepVar indices stable variables. bootstrap data.frame block weight vectors computed bootstrap sample. rgcca_res RGCCA object fitted stable variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"","code":"if (FALSE) { ########################### # stability and bootstrap # ########################### data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc fit_sgcca <- rgcca(blocks, sparsity = c(.071, .2, 1), ncomp = c(1, 1, 1), scheme = \"centroid\", verbose = TRUE, response = 3 ) boot_out <- rgcca_bootstrap(fit_sgcca, n_boot = 100, n_cores = 1) fit_stab <- rgcca_stability(fit_sgcca, keep = sapply(fit_sgcca$a, function(x) mean(x != 0)), n_cores = 1, n_boot = 10, verbose = TRUE ) boot_out <- rgcca_bootstrap( fit_stab, n_boot = 500, n_cores = 1, verbose = TRUE ) plot(boot_out, block = 1:2, n_mark = 2000, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":null,"dir":"Reference","previous_headings":"","what":"Reduce dimensionality using RGCCA β€” rgcca_transform","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"function projects testing blocks using block weight vectors fitted RGCCA object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"","code":"rgcca_transform(rgcca_res, blocks_test = rgcca_res$call$blocks)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"rgcca_res fitted RGCCA object (see rgcca). blocks_test list blocks (data.frame matrix) projected.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"list matrices containing projections test blocks using block weight vectors fitted RGCCA object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"","code":"data(\"Russett\") blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:11]) Xtrain <- lapply(blocks, function(x) x[1:32, ]) Xtest <- lapply(blocks, function(x) x[33:47, ]) fit_rgcca <- rgcca(Xtrain, ncomp = 2) projection <- rgcca_transform(fit_rgcca, Xtest)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"`summary.rgcca()` summarizes fitted RGCCA object. information model displayed like model parameters criterion. `summary.rgcca_cv()` summarizes fitted rgcca_cv object. Parameters analysis, tuning parameters statistics set parameters displayed. `summary.rgcca_permutation()` summarizes fitted rgcca_permutation object. Parameters analysis, tuning parameters statistics set parameters displayed. `summary.rgcca_bootstrap()` summarizes fitted rgcca_bootstrap object. Parameters analysis bootstrap statistics displayed. `summary.rgcca_stability()` calls `summary.rgcca()` fitted RGCCA model returned `rgcca_stability()`.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"","code":"# S3 method for rgcca summary(object, ...) # S3 method for rgcca_cv summary(object, type = c(\"sd\", \"quantile\"), ...) # S3 method for rgcca_permutation summary(object, ...) # S3 method for rgcca_bootstrap summary( object, block = seq_along(object$rgcca$call$blocks), comp = 1, type = c(\"weights\", \"loadings\"), empirical = TRUE, display_order = FALSE, adj.method = \"fdr\", ... ) # S3 method for rgcca_stability summary(object, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"object object summarized (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). ... arguments passed methods (displaying matrices). type character string indicating type summarized object (see details). block numeric corresponding block(s) summarize. comp numeric vector indicating component(s) consider. empirical logical value indicating bootstrap confidence intervals p-values derived empirical distribution. (default: TRUE) display_order logical value ordering variables. TRUE, variables ordered highest lowest absolute value. FALSE, block order used. Default TRUE. adj.method string indicating method used adjust p-values. must method handled p.adjust function. Default \"fdr\".","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"none","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"Argument type can take two values `summary.cval`: \"sd\" (default): mean values cross-validated scores reported, well means plus minus standard deviations. \"quantiles\": median values, 25% 75% quantiles cross-validated scores reported. Argument type can take two values `summary.bootstrap`: \"weights\" (default): statistics block-weight vectors reported. \"loadings\": statistics block-loading vectors reported.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"","code":"## Summary of an rgcca object data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) res <- rgcca(blocks, connection = C, ncomp = rep(2, 3), tau = c(1, 1, 1), scheme = \"factorial\", scale = TRUE, verbose = FALSE ) summary(res) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block='inertia', #> init='svd', bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(2,2,2), #> response=NULL, comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 0 1 #> industry 0 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> Sum_{j,k} c_jk g(cov(X_j a_j, X_k a_k) = 0.5346 #> #> The regularization parameter used for agriculture is: 1 #> The regularization parameter used for industry is: 1 #> The regularization parameter used for politic is: 1 #> ## Summary of an rgcca_cv object res <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0, 0.2, 0.3), n_run = 1, n_cores = 1, verbose = TRUE ) summary(res) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block=TRUE, init='svd', #> bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(1,1,1), response=3, #> comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 0 1 #> industry 0 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Tuning parameters (tau) used: #> agriculture industry politic #> 1 0 0.200 0.300 #> 2 0 0.178 0.267 #> 3 0 0.156 0.233 #> 4 0 0.133 0.200 #> 5 0 0.111 0.167 #> 6 0 0.089 0.133 #> 7 0 0.067 0.100 #> 8 0 0.044 0.067 #> 9 0 0.022 0.033 #> 10 0 0.000 0.000 #> #> Validation: kfold with 5 folds and 1 run(s)) #> Prediction model: lm #> #> Tuning parameters Mean RMSE Sd #> 1 Set 1 1.10 0.216 #> 2 Set 2 1.11 0.215 #> 3 Set 3 1.11 0.214 #> 4 Set 4 1.11 0.212 #> 5 Set 5 1.11 0.210 #> 6 Set 6 1.11 0.208 #> 7 Set 7 1.11 0.206 #> 8 Set 8 1.12 0.203 #> 9 Set 9 1.12 0.199 #> 10 Set 10 1.12 0.197 #> #> The best combination is: Set 1 for a mean RMSE of 1.1 ## Summary of an rgcca_permutation object perm.out <- rgcca_permutation(blocks, par_type = \"tau\", n_perms = 5, n_cores = 1, verbose = TRUE ) summary(perm.out) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block=TRUE, init='svd', #> bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(1,1,1), response=NULL, #> comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 1 1 #> industry 1 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Tuning parameters (tau) used: #> agriculture industry politic #> 1 1.000 1.000 1.000 #> 2 0.889 0.889 0.889 #> 3 0.778 0.778 0.778 #> 4 0.667 0.667 0.667 #> 5 0.556 0.556 0.556 #> 6 0.444 0.444 0.444 #> 7 0.333 0.333 0.333 #> 8 0.222 0.222 0.222 #> 9 0.111 0.111 0.111 #> 10 0.000 0.000 0.000 #> #> Tuning parameters Criterion Permuted criterion sd zstat p-value #> 1 1.00/1.00/1.00 0.644 0.0948 0.0651 8.43 0 #> 2 0.89/0.89/0.89 0.685 0.1021 0.0693 8.41 0 #> 3 0.78/0.78/0.78 0.731 0.1108 0.0740 8.39 0 #> 4 0.67/0.67/0.67 0.783 0.1211 0.0792 8.36 0 #> 5 0.56/0.56/0.56 0.842 0.1336 0.0851 8.33 0 #> 6 0.44/0.44/0.44 0.910 0.1495 0.0916 8.31 0 #> 7 0.33/0.33/0.33 0.990 0.1705 0.0986 8.31 0 #> 8 0.22/0.22/0.22 1.085 0.2006 0.1055 8.38 0 #> 9 0.11/0.11/0.11 1.204 0.2510 0.1081 8.82 0 #> 10 0.00/0.00/0.00 1.429 0.4167 0.0919 11.01 0 #> The best combination is: 0.00/0.00/0.00 for a z score of 11 and a p-value of 0 ## Summary of an rgcca_bootstrap object fit.rgcca <- rgcca(blocks, ncomp = c(2, 1, 2)) boot.out <- rgcca_bootstrap(fit.rgcca, n_boot = 20, n_cores = 2, verbose = TRUE) #> Bootstrap samples sanity check... #> OK summary(boot.out) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block='inertia', #> init='svd', bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(2,1,2), #> response=NULL, comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 1 1 #> industry 1 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Extracted statistics from 20 bootstrap samples. #> Block-weight vectors for component 1: #> estimate mean sd lower_bound upper_bound bootstrap_ratio pval #> gini 0.661 0.6424 0.0537 0.54401 0.717 12.300 0.0000 #> farm 0.742 0.7280 0.0402 0.64648 0.790 18.444 0.0000 #> rent 0.117 0.0892 0.2180 -0.33455 0.387 0.538 0.5385 #> gnpr 0.732 0.7266 0.0497 0.65407 0.821 14.715 0.0000 #> labo -0.682 -0.6832 0.0555 -0.75615 -0.569 -12.288 0.0000 #> inst 0.249 0.2524 0.1372 0.00582 0.445 1.816 0.0526 #> ecks 0.661 0.6462 0.0776 0.45913 0.745 8.520 0.0000 #> death 0.708 0.7000 0.0737 0.60750 0.859 9.605 0.0000 #> adjust.pval #> gini 0.0000 #> farm 0.0000 #> rent 0.5799 #> gnpr 0.0000 #> labo 0.0000 #> inst 0.0819 #> ecks 0.0000 #> death 0.0000 #> ## Summary of an rgcca_stability object fit.sgcca <- rgcca(blocks, sparsity = c(.8, .9, .6)) res <- rgcca_stability(fit.sgcca, n_boot = 10, verbose = TRUE) #> Bootstrap samples sanity check... #> OK summary(res) #> Fitted SGCCA model. #> The algorithm converged to a stationnary point after 2 iterations. #>"},{"path":"https://rgcca-factory.github.io/RGCCA/news/index.html","id":"rgcca-302","dir":"Changelog","previous_headings":"","what":"RGCCA 3.0.2","title":"RGCCA 3.0.2","text":"CRAN release: 2023-10-09 Rename RGCCA classes prefix β€œrgcca_”. Merge documentation print functions. Merge documentation plot functions. Environment variable TEST_SNAPSHOTS must set β€œTRUE” snapshots evaluated.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/news/index.html","id":"rgcca-300","dir":"Changelog","previous_headings":"","what":"RGCCA 3.0.0","title":"RGCCA 3.0.0","text":"CRAN release: 2023-04-27 Added NEWS.md file track changes package. Many differences introduced since last version published CRAN. list important ones: * function rgcca now main entry point package. * Many well-known methods multiblock literature now directly available setting method argument rgcca function. list methods can found using available_methods function. * Arguments C rgcca function now deprecated. blocks connection used instead. * Small utility functions longer exported. * Functions rgcca_transform rgcca_predict added. allow applying fitted RGCCA models project new subjects onto learned subspaces make predictions response blocks using caret predictive models. * Functions rgcca_cv rgcca_permutation added. allow finding best parameters models based cross-validation permutation criterion. * function rgcca_bootstrap added evaluate weights model using bootstrap procedure. * function rgcca_stability added evaluate stability variable selection performed SGCCA. * Print plot functions added outputs functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability.","code":""}] +[{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement arthur.tenenhaus@centralesupelec.fr. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to RGCCA","title":"Contributing to RGCCA","text":"CONTRIBUTING.md adapted https://gist.github.com/peterdesmet/e90a1b0dc17af6c12daf6e8b2f044e7c First , thanks considering contributing RGCCA! πŸ‘ ’s people like make rewarding us - project maintainers - work RGCCA. 😊 RGCCA open source project, maintained people care. directly funded .","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of conduct","title":"Contributing to RGCCA","text":"Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"how-you-can-contribute","dir":"","previous_headings":"","what":"How you can contribute","title":"Contributing to RGCCA","text":"several ways can contribute project. want know contribute open source projects like one, see Open Source Guide.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"share-the-love-️","dir":"","previous_headings":"How you can contribute","what":"Share the love ❀️","title":"Contributing to RGCCA","text":"Think RGCCA useful? Let others discover , telling person, via Twitter blog post. Using RGCCA paper writing? Consider citing .","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"ask-a-question-️","dir":"","previous_headings":"How you can contribute","what":"Ask a question ⁉️","title":"Contributing to RGCCA","text":"Using RGCCA got stuck? Browse documentation see can find solution. Still stuck? Post question issue GitHub. offer user support, ’ll try best address , questions often lead better documentation discovery bugs. Want ask question private? Contact package maintainer email.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"propose-an-idea-","dir":"","previous_headings":"How you can contribute","what":"Propose an idea πŸ’‘","title":"Contributing to RGCCA","text":"idea new RGCCA feature? Take look documentation issue list see isn’t included suggested yet. , suggest idea issue GitHub. can’t promise implement idea, helps : Explain detail work. Keep scope narrow possible. See want contribute code idea well.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"report-a-bug-","dir":"","previous_headings":"How you can contribute","what":"Report a bug πŸ›","title":"Contributing to RGCCA","text":"Using RGCCA discovered bug? ’s annoying! Don’t let others experience report issue GitHub can fix . good bug report makes easier us , please include: operating system name version (e.g.Β Mac OS 10.13.6). details local setup might helpful troubleshooting. Detailed steps reproduce bug.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"improve-the-documentation-","dir":"","previous_headings":"How you can contribute","what":"Improve the documentation πŸ“–","title":"Contributing to RGCCA","text":"Noticed typo website? Think function use better example? Good documentation makes difference, help improve welcome! #### website website generated pkgdown. means don’t write html: content pulled together documentation code, vignettes, Markdown files, package DESCRIPTION _pkgdown.yml settings. know way around pkgdown, can propose file change improve documentation. , report issue can point right direction.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"function-documentation","dir":"","previous_headings":"How you can contribute > Improve the documentation πŸ“–","what":"Function documentation","title":"Contributing to RGCCA","text":"Functions described comments near code translated documentation using roxygen2. want improve function description: Go R/ directory code repository. Look file name function. Propose file change update function documentation roxygen comments (starting #').","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"contribute-code-","dir":"","previous_headings":"How you can contribute","what":"Contribute code πŸ“","title":"Contributing to RGCCA","text":"Care fix bugs implement new functionality RGCCA? Awesome! πŸ‘ look issue list leave comment things want work . See also development guidelines .","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/CONTRIBUTING.html","id":"development-guidelines","dir":"","previous_headings":"","what":"Development guidelines","title":"Contributing to RGCCA","text":"try follow GitHub flow development. Fork repo clone computer. learn process, see guide. forked cloned project since worked , pull changes original repo clone using git pull upstream main. Open RStudio project file (.Rproj). Make changes: Write code. Test code (bonus points adding unit tests). Document code (see function documentation ). Check code devtools::check() aim 0 errors warnings. Commit push changes. Submit pull request.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Fabien Girka. Author. Etienne Camenen. Author. Caroline Peltier. Author. Arnaud Gloaguen. Author. Vincent Guillemot. Author. Laurent Le Brusquet. Thesis advisor. Arthur Tenenhaus. Author, thesis advisor, maintainer.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Girka F, Camenen E, Peltier C, Gloaguen , Guillemot V, Le Brusquet L, Tenenhaus (????). RGCCA: Regularized Sparse Generalized Canonical Correlation Analysis Multiblock Data. R package version 3.0.3, https://CRAN.R-project.org/package=RGCCA.","code":"@Manual{, title = {{RGCCA}: Regularized and Sparse Generalized Canonical Correlation Analysis for Multiblock Data}, author = {Fabien Girka and Etienne Camenen and Caroline Peltier and Arnaud Gloaguen and Vincent Guillemot and Laurent {Le Brusquet} and Arthur Tenenhaus}, note = {R package version 3.0.3}, url = {https://CRAN.R-project.org/package=RGCCA}, }"},{"path":[]},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"authors","dir":"","previous_headings":"","what":"Authors:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Fabien GIRKA, Etienne CAMENEN, Caroline PELTIER, Vincent GUILLEMOT, Arnaud GLOAGUEN, Laurent LE BRUSQUET, Arthur TENENHAUS","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"key-words","dir":"","previous_headings":"","what":"Key-words:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Regularized Generalized Canonical Correlation Analysis, multi-block data analysis","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact:","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"arthur.tenenhaus@centralesupelec.fr","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"short-description","dir":"","previous_headings":"","what":"Short description","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Performs multiblock component methods (PCA, CCA, PLS, MCOA, GCCA, CPCA, MAXVAR, R/SGCCA, etc.) produces graphical outputs (e.g.Β variables individuals plots) statistics assess robustness/significance analysis.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"contents","dir":"","previous_headings":"","what":"Contents","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Description Algorithm Installation Installation development branch git repository References","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"descriptiont","dir":"","previous_headings":"","what":"Descriptiont","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"package multiblock data analysis (RGCCA - Regularized Generalized Canonical Correlation Analysis) described [1-4]. software produces graphical outputs statistics assess robustness/significance analysis.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"algorithm","dir":"","previous_headings":"","what":"Algorithm","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"consider J data matrices X1, …, XJ. nβ€…Γ—β€…pj data matrix Xj = [xj1,…,xjpj] called block represents set pj variables observed n individuals. number nature variables may differ one block another, individuals must across blocks. assume variables centered. objective RGCCA find, block, weighted composite variables (called block component) yj = Xjaj,Β j = 1, ..., J (aj column-vector pj elements) summarizing relevant information within blocks. block components obtained () block components explain well block /(ii) block components assumed connected highly correlated. addition, RGCCA integrates variable selection procedure, called SGCCA, allowing identification relevant features. RGCCA subsumes fifty years multiblock component methods defined following optimization problem: $$\\underset{\\mathbf a_1, \\dots, \\mathbf a_J}{\\text{maximize}} \\sum_{j, k = 1}^J c_{jk} g(\\text{cov}(\\mathbf X_j \\mathbf a_j, \\mathbf X_k \\mathbf a_k)) \\text{ s.t. } (1 - \\tau_j)\\text{var}(\\mathbf X_j \\mathbf a_j) + \\tau_j \\Vert \\mathbf a_j \\Vert^2 = 1, ~ j = 1, \\dots, J.$$ scheme function g continuous convex function allows consider different optimization criteria. Typical choices g identity (horst scheme, leading maximizing sum covariances block components), absolute value (centroid scheme, yielding maximization sum absolute values covariances), square function (factorial scheme, thereby maximizing sum squared covariances), , generally, even integer m, g(x) = xm (m-scheme, maximizing power m sum covariances). horst scheme penalizes structural negative correlation block components centroid scheme m-scheme enable two components negatively correlated. According [5], fair model model blocks contribute equally solution opposition model dominated J sets. fairness major objective, user must choose m = 1. m > 1 preferable user wants discriminate blocks. practice, m equal 1, 2 4. higher value m method acts block selector [5]. design matrix C symmetric Jβ€…Γ—β€…J matrix nonnegative elements describing network connections blocks user wants take account. Usually, cjk = 1 two connected blocks 0 otherwise. Ο„j called shrinkage parameters regularization parameters ranging 0 1. Ο„j enables interpolate smoothly maximizing covariance maximizing correlation. Setting Ο„j 0 force block components unit variance (var(Xjaj) = 1). case, covariance criterion boils correlation. correlation criterion better explaining correlated structure across datasets, thus discarding variance within individual dataset. Setting Ο„j 1 normalize block weight vectors (β€–aj‖ = 1), applies covariance criterion. value 0 1 lead compromise two first options correspond following constraint (1βˆ’Ο„j)var(Xjaj)β€…+β€…Ο„jβ€–ajβ€–2 = 1. RGCCA package, block, determination shrinkage parameter can made fully automatic using analytical formula proposed (SchΓ€fer Strimmer 2005 [6]), permutation K fold cross-validation. Moreover, can define choice shrinkage parameters providing interpretations properties resulting block components: Ο„j = 1 yields maximization covariance-based criterion. recommended user wants stable component (large variance) simultaneously taking account correlations blocks. user must, however, aware variance dominates correlation. Ο„j = 0 yields maximization correlation-based criterion. recommended user wants maximize correlations connected components. option can yield unstable solutions case multi-collinearity used data block rank deficient (e.g.Β n < pj). 0 < τj < 1 good compromise variance correlation: block components simultaneously stable well correlated possible connected block components. setting can used data block rank deficient. quality interpretability RGCCA block components yj = Xjaj,Β j = 1, …, J likely affected usefulness relevance variables block. Accordingly, important issue identify within block subset significant variables active relationships blocks. SGCCA extends RGCCA address issue variable selection. Specifically, RGCCA Ο„j equal 1 combined L1-penalty gives rise SGCCA [3]. SGCCA optimization problem defined sj, user defined positive constant determines amount sparsity additional constraint β€–ajβ€–1 ≀ sj,Β j = 1, …, J. smaller sj, larger degree sparsity aj. sparsity parameter sj usually set cross-validation permutation. Alternatively, values sj can simply chosen result desired amounts sparsity.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Required: Software: R (β‰₯ 3.2.0) R libraries: see DESCRIPTION file. See vignette introduction package.","code":"install.packages(\"RGCCA\")"},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"installation-of-a-development-branch-from-the-git-repository","dir":"","previous_headings":"","what":"Installation of a development branch from the git repository","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Required: Software: R (β‰₯ 3.2.0) R libraries: see DESCRIPTION file. R library devtools.","code":"remove.packages(\"RGCCA\") devtools::install_github(repo=\"https://github.com/rgcca-factory/RGCCA.git\", ref = \"main\")"},{"path":"https://rgcca-factory.github.io/RGCCA/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Regularized and Sparse Generalized Canonical Correlation\n Analysis for Multiblock Data","text":"Tenenhaus, M., Tenenhaus, ., & Groenen, P. J. (2017). Regularized generalized canonical correlation analysis: framework sequential multiblock component methods. Psychometrika, 82(3), 737-777. Tenenhaus, ., Philippe, C., & Frouin, V. (2015). Kernel generalized canonical correlation analysis. Computational Statistics & Data Analysis, 90, 114-131. Tenenhaus, ., Philippe, C., Guillemot, V., Le Cao, K. ., Grill, J., & Frouin, V. (2014). Variable selection generalized canonical correlation analysis. Biostatistics, 15(3), 569-583. Tenenhaus, ., & Tenenhaus, M. (2011). Regularized generalized canonical correlation analysis. Psychometrika, 76(2), 257. Van de Geer, J. P. (1984). Linear relations among K sets variables. Psychometrika, 49(1), 79-94. SchΓ€fer, J., & Strimmer, K. (2005). shrinkage approach large-scale covariance matrix estimation implications functional genomics. Statistical applications genetics molecular biology, 4(1). Tenenhaus, ., & Tenenhaus, M. (2014). Regularized generalized canonical correlation analysis multiblock multigroup data analysis. European Journal operational research, 238(2), 391-403.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":null,"dir":"Reference","previous_headings":"","what":"European Customer Satisfaction Index β€” ECSI","title":"European Customer Satisfaction Index β€” ECSI","text":"European Consumer Satisfaction Index (ECSI) economic indicator measures customer satisfaction. ECSI adaptation Swedish Customer Satisfaction Barometer (Fornell, 1992) compatible American Customer Satisfaction Index. indicators describing latent variables given Mobile Phone Industry. original items scaled 1 10 transformed new normalized variables. minimum possible value variable 0 maximum possible value equal 10. IMAG Image phone provider (eta_1) () Reputation phone provider, (b) Trustworthiness, (c) Seriousness, (d) Solidness, (e) Caring customer's needs. EXPE Customer Expectations overall quality (eta_2) () Expectations overall quality \"mobile phone provider\" moment became customer provider, (b) Expectations \"mobile phone provider\" provide products services meet personal need, (c) often expect things go wrong \"mobile phone provider\". QUAL Perceived Quality (eta_3) () Overall perceived quality, (b) Overall perceived quality, (c) Customer service personal advice offered, (d) Quality services use, (e) Range services products offered, (f) Reliability accuracy products services provided, (g) Clarity transparency information provided. VAL Perceived Value (eta_4) () Given quality products services offered \"mobile phone provider\" rate fees prices pay ? (b) Given fees prices pay mobile phone provider rate quality products services offered \"mobile phone provider\"? SAT Customer Satisfaction (eta_5) () Overall satisfaction, (b) Fulfillment expectations, (c) well think \"mobile phone provider\" compares ideal \"mobile phone provider\"? LOY Customer Loyalty (eta_6) () need choose new \"mobile phone provider\" likely choose provider ? (b) Let us now suppose \"mobile phone provider\"s decide lower fees prices, \"mobile phone provider\" stays level today. level difference (%) choose another \"mobile phone provider\"? (c) friend colleague asks advice, likely recommend \"mobile phone provider\"?","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"European Customer Satisfaction Index β€” ECSI","text":"","code":"data(ECSI)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"European Customer Satisfaction Index β€” ECSI","text":"data frame 250 rows 24 variables","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/ECSI.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"European Customer Satisfaction Index β€” ECSI","text":"Fornell C. (1992): national customer satisfaction barometer. Swedish experience. Journal Marketing, (56), 6-21.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":null,"dir":"Reference","previous_headings":"","what":"Russett data β€” Russett","title":"Russett data β€” Russett","text":"Russett data set (Russett, 1964) studied Gifi (1990). Three blocks variables defined 47 countries. first block related \"Agricultural Inequality\", second \"Industrial Development\", last one describes \"Political Instability\". Russett collected data study relationships Agricultural Inequality, Industrial Development Political Instability. Russett's hypotheses can formulated follows: difficult country escape dictatorship agricultural inequality -average industrial development -average. X1 Agricultural Inequality GINI: Inequality land distribution, FARM: Percentage farmers half land, RENT: Percentage farmers rent land. X2 Industrial Development GNPR: Gross national product per capita ($1955), LABO: Percentage labor forced employed agriculture. X3 Political Instability INST: Instability executive (45-61), ECKS: Number violent internal war incidents (46-61), DEAT: Number people killed result civic group violence (50-62), DEMOSTAB: Stable democracy, DEMOINST: Unstable democracy, DICTATOR: Dictatorship.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Russett data β€” Russett","text":"","code":"data(Russett)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Russett data β€” Russett","text":"data frame 47 rows 12 variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Russett data β€” Russett","text":"Russett B.M. (1964), Inequality Instability: Relation Land Tenure Politics, World Politics 16:3, 442-454. Gifi, . (1990), Nonlinear multivariate analysis, Chichester: Wiley.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/Russett.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Russett data β€” Russett","text":"","code":"#Loading of the Russett dataset data(Russett) #Russett is partitioned into three blocks (X_agric, X_ind, X_polit) X_agric <- Russett[, c(\"gini\", \"farm\", \"rent\")] X_ind <- Russett[, c(\"gnpr\", \"labo\")] X_polit <- Russett[, c(\"inst\", \"ecks\", \"death\", \"demostab\", \"demoinst\", \"dictator\")] A <- list(X_agric, X_ind, X_polit)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Available methods for RGCCA β€” available_methods","title":"Available methods for RGCCA β€” available_methods","text":"List methods can used rgcca function.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Available methods for RGCCA β€” available_methods","text":"","code":"available_methods()"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Available methods for RGCCA β€” available_methods","text":"vector methods implemented rgcca function.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/available_methods.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Available methods for RGCCA β€” available_methods","text":"","code":"available_methods() #> [1] \"rgcca\" \"sgcca\" \"pca\" \"spca\" \"pls\" \"spls\" #> [7] \"cca\" \"ifa\" \"ra\" \"gcca\" \"maxvar\" \"maxvar-b\" #> [13] \"maxvar-a\" \"mfa\" \"mcia\" \"mcoa\" \"cpca-1\" \"cpca-2\" #> [19] \"cpca-4\" \"hpca\" \"maxbet-b\" \"maxbet\" \"maxdiff-b\" \"maxdiff\" #> [25] \"sabscor\" \"ssqcor\" \"ssqcov-1\" \"ssqcov-2\" \"ssqcov\" \"sumcor\" #> [31] \"sumcov-1\" \"sumcov-2\" \"sumcov\" \"sabscov-1\" \"sabscov-2\""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a fitted object from the RGCCA package β€” plot.rgcca","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"`plot.rgcca()` plots fitted RGCCA object. `plot.rgcca_cv()` plots fitted rgcca_cv object. Boxplots cross-validated scores different parameter sets displayed. `plot.rgcca_permutation()` plots fitted rgcca_permutation object. Permutation statistics displayed set parameters. `plot.rgcca_bootstrap()` plots fitted rgcca_bootstrap object. block variable shown along associated bootstrap confidence interval stars reflecting p-value assigning strictly positive negative weight block variable. `plot.rgcca_stability()` calls `plot.rgcca()` fitted RGCCA model returned `rgcca_stability()`.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"","code":"# S3 method for rgcca plot( x, type = \"weights\", block = seq_along(x$call$blocks), comp = c(1, 2), response = as.factor(rep(1, NROW(x$Y[[1]]))), display_order = TRUE, title = NULL, cex = 1, cex_sub = 12 * cex, cex_main = 14 * cex, cex_lab = 12 * cex, cex_point = 3 * cex, n_mark = 30, sample_colors = NULL, sample_shapes = NULL, var_colors = NULL, var_shapes = NULL, AVE_colors = NULL, show_sample_names = TRUE, show_var_names = TRUE, repel = FALSE, display_blocks = seq_along(x$call$blocks), expand = 1, show_arrows = TRUE, ... ) # S3 method for rgcca_cv plot( x, type = c(\"sd\", \"quantile\"), cex = 1, cex_main = 14 * cex, cex_sub = 12 * cex, cex_point = 3 * cex, cex_lab = 12 * cex, display_order = TRUE, ... ) # S3 method for rgcca_permutation plot( x, type = c(\"crit\", \"zstat\"), cex = 1, title = NULL, cex_main = 14 * cex, cex_sub = 12 * cex, cex_point = 3 * cex, cex_lab = 12 * cex, display_order = TRUE, show_legend = FALSE, ... ) # S3 method for rgcca_bootstrap plot( x, block = seq_along(x$rgcca$call$blocks), comp = 1, type = c(\"weights\", \"loadings\"), empirical = TRUE, n_mark = 30, display_order = TRUE, show_stars = TRUE, title = NULL, cex = 1, cex_sub = 12 * cex, cex_main = 14 * cex, cex_lab = 12 * cex, cex_point = 3 * cex, colors = NULL, adj.method = \"fdr\", ... ) # S3 method for rgcca_stability plot(x, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"x object plotted (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). type character string indicating type plot (see details). block numeric corresponding block(s) plot. comp numeric vector indicating component(s) consider. response vector coloring points \"samples\" plot. display_order logical value ordering variables. TRUE, variables ordered highest lowest absolute value. FALSE, block order used. Default TRUE. title string specifying title plot. cex numeric defining size objects plot. Default one. cex_sub numeric defining font size subtitle. Default 12 * cex. cex_main numeric defining font size title. Default 14 * cex. cex_lab numeric defining font size labels. Default 12 * cex. cex_point numeric defining font size points. Default 3 * cex. n_mark integer defining maximum number plotted objects (see details). sample_colors string specifying colors used color samples (used \"samples\" \"biplot\" plots). sample_shapes Shapes used sample points (used \"samples\" \"biplot\" plots). var_colors Colors used color variable weights correlations canonical components (used \"weights\", \"loadings\", \"cor_circle\" \"biplot\" plots). var_shapes Shapes used points associated variable weights correlations canonical components (used \"cor_circle\" \"biplot\" plots). AVE_colors Colors used AVE plot. show_sample_names logical value showing sample names plots \"samples\" \"biplot\". show_var_names logical value showing variable names plots \"cor_circle\" \"biplot\". repel logical value repelling text labels . Default FALSE. display_blocks numeric corresponding block(s) display correlation_circle. blocks displayed default. expand numeric scales weights associated block variables biplot. Default 1. show_arrows logical, TRUE, arrows shown biplot. Default FALSE. ... Additional graphical parameters. show_legend logical value indicating legend shown (default FALSE). empirical logical value indicating bootstrap confidence intervals p-values derived empirical distribution. (default: TRUE) show_stars logical value indicating significance levels displayed. colors Colors used plots. adj.method string indicating method used adjust p-values. must method handled p.adjust function. Default \"fdr\".","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"ggplot2 plot object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"Argument type can take 7 values `plot.rgcca`: \"weights\" (default): barplot block weight vectors one specific block/component. Sorting applied according display_order argument. number displayed weights can set n_marks. \"loadings\": barplot block-loading vectors. Sorting applied according display_order argument. number displayed loadings can set n_marks. \"samples\": scatter plot block components. blocks used defined block argument, components comp argument (Y[[block[1]]][, comp[1]], Y[[block[2]]][,comp[2]]). Points can colored according response argument. \"cor_circle\" correlation circle. represents correlation block component corresponding first element block argument, variables block corresponding blocks specified argument display_blocks. \"\": displays sample plot correlation circle (implemented one block least two components extracted (ncomp >= 2). \"biplot\": displays plot scatter plot block components variables used compute block components. \"ave\": displays average variance explained block. Argument type can take 2 values `plot.rgcca_cv`: \"sd\" (default): middle bar boxplots corresponds mean limits given mean plus minus standard deviation. \"quantile\": middle bar corresponds median limits boxes given 25% 75% quantiles. Argument type can take 2 values `plot.rgcca_permutation`: \"crit\" (default): RGCCA criterion permuted permuted datasets displayed set parameters. \"zstat\": Z-score displayed set parameters. Argument type can take 2 values `plot.rgcca_bootstrap`: \"weights\" (default): statistics block-weight vectors displayed. \"loadings\": statistics block-loading vectors displayed.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a fitted object from the RGCCA package β€” plot.rgcca","text":"","code":"## Plotting of an rgcca object data(\"Russett\") blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = as.factor(apply(Russett[, 9:11], 1, which.max)) ) blocks2 <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) status <- colnames(Russett)[9:11][apply(Russett[, 9:11], 1, which.max)] fit_rgcca <- rgcca(blocks = blocks, response = 3, ncomp = 2) plot(fit_rgcca, type = \"sample\", block = 1:2, comp = 1) plot(fit_rgcca, type = \"loadings\") plot(fit_rgcca, type = \"weight\") plot(fit_rgcca, type = \"sample\") plot(fit_rgcca, type = \"cor_circle\") plot(fit_rgcca, type = \"both\") plot(fit_rgcca, type = \"biplot\") plot(fit_rgcca, type = \"ave\") if (FALSE) { # With a superblock fit_mcoa <- rgcca(blocks = blocks2, method = \"mcoa\", ncomp = 2) plot(fit_mcoa, type = \"both\", response = status) plot(fit_mcoa, type = \"biplot\", response = status) ## Plotting of an rgcca_cv object cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = 1, n_run = 1, n_cores = 1, prediction_model = \"lda\", metric = \"Accuracy\", verbose = TRUE ) plot(cv_out, type = \"sd\") plot(cv_out, type = \"quantile\") ## Ploting of an rgcca_permutation object perm_out <- rgcca_permutation(blocks2, par_type = \"tau\", n_perms = 2, n_cores = 1) plot(perm_out, type = \"crit\") plot(perm_out, type = \"zstat\") ## Plotting of an rgcca_bootstrap object boot_out <- rgcca_bootstrap(fit_rgcca, n_boot = 20, n_cores = 1) plot(boot_out, type = \"weights\", block = 1, comp = 1) plot(boot_out, type = \"loadings\", comp = 2, display_order = FALSE, show_stars = FALSE) ## Plotting of an rgcca_stability object fit.sgcca <- rgcca(blocks2, sparsity = c(.8, .9, .6)) res <- rgcca_stability( fit.sgcca, n_boot = 10, verbose = TRUE, keep = rep(.1, 3) ) plot(res, type = \"samples\") }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a fitted object from the RGCCA package β€” print.rgcca","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"`print.rgcca()` prints fitted RGCCA object. method number components displayed. `print.rgcca_cv()` prints rgcca_cv object. type validation, number tried parameter sets, type task, model used displayed. `print.rgcca_permutation()` prints rgcca_permutation object. number permutations tried parameter sets displayed. `print.rgcca_bootstrap()` prints rgcca_bootstrap object. number boostrap samples used fitting displayed. `print.rgcca_stability()` prints rgcca_stability object. number boostrap samples used fitting displayed.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"","code":"# S3 method for rgcca print(x, ...) # S3 method for rgcca_cv print(x, ...) # S3 method for rgcca_permutation print(x, ...) # S3 method for rgcca_bootstrap print(x, ...) # S3 method for rgcca_stability print(x, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"x object printed (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). ... arguments passed methods.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"none","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/print.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print a fitted object from the RGCCA package β€” print.rgcca","text":"","code":"## Printing of an rgcca object data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) res <- rgcca(blocks, connection = C, ncomp = rep(2, 3), tau = c(1, 1, 1), scheme = \"factorial\", scale = TRUE, verbose = FALSE ) print(res) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point: #> \t- After 2 iterations for component 1. #> \t- After 6 iterations for component 2. ## Printing of an rgcca_cv object res <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0, 0.2, 0.3), n_run = 1, n_cores = 1, verbose = TRUE ) print(res) #> RGCCA cross-validation object obtained with 10 sets of parameters using 5 folds. #> Regression was performed using lm model. ## Printing of an rgcca_permutation object perm.out <- rgcca_permutation(blocks, par_type = \"tau\", n_perms = 5, n_cores = 1, verbose = TRUE ) print(perm.out) #> RGCCA permutation object obtained with 10 sets of parameters and 5 permutations each. ## Printing of an rgcca_bootstrap object fit.rgcca <- rgcca(blocks, ncomp = c(2, 1, 2)) boot.out <- rgcca_bootstrap(fit.rgcca, n_boot = 20, n_cores = 2, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(boot.out) #> RGCCA bootstrap object obtained with 20 bootstrap samples. ## Printing of an rgcca_stability object fit.sgcca <- rgcca(blocks, sparsity = c(.8, .9, .6)) res <- rgcca_stability(fit.sgcca, n_boot = 10, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(res) #> RGCCA stability object obtained with 10 bootstrap samples."},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":null,"dir":"Reference","previous_headings":"","what":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"RGCCA general statistical framework multiblock data analysis. rgcca() function implements framework main entry point package.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"","code":"rgcca( blocks, connection = NULL, tau = 1, ncomp = 1, scheme = \"factorial\", scale = TRUE, init = \"svd\", bias = TRUE, tol = 1e-08, verbose = FALSE, scale_block = \"inertia\", method = \"rgcca\", sparsity = 1, response = NULL, superblock = FALSE, NA_method = \"na.ignore\", quiet = TRUE, n_iter_max = 1000, comp_orth = TRUE, A = NULL, C = NULL )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. connection (\\(J \\times J\\)) symmetric matrix describing network connections blocks (default value: 1-diag(J)). tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. scale logical value indicating variables standardized. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). tol stopping value convergence algorithm (default: tol = 1e-08). verbose logical value indicating progress algorithm reported computing. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. method string specifying multiblock component method consider. Possible values found using available_methods. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. response numerical value giving position response block. response argument filled, supervised mode automatically activated. superblock logical value indicating superblock option used. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). quiet logical value indicating diagnostic messages reported. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors. Deprecated argument, please use blocks instead. C Deprecated argument, please use connection instead.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"fitted rgcca object. Y list \\(J\\) elements. jth element list \\(Y\\) matrix contains block components block j. list \\(J\\) elements. jth element list \\(\\) matrix contains block weight vectors block j. astar list \\(J\\) elements. column astar[[j]] vector Y[[j]] = blocks[[j]] %*% astar[[j]]. crit list vector length max(ncomp). vector list related one specific deflation stage reports values criterion stage across iterations. primal_dual vector length J. Element \\(j\\) either \"primal\" \"dual\", depending whether primal dual RGCCA algorithm used block \\(j\\). AVE list numerical values giving indicators model quality based Average Variance Explained (AVE): AVE(block), AVE(outer model), AVE(inner model). optimal logical value indicating Schaffer Strimmer formula applied estimating optimal tau parameters. opt list containing options fitted RGCCA object. call Call function. blocks list contains \\(J\\) blocks variables \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\). Block \\(\\mathbf X_j\\) matrix dimension \\(n \\times p_j\\) \\(p_j\\) number variables \\(\\mathbf X_j\\). blocks preprocessed according values scale/scale_block/NA_method.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"Given \\(J\\) data matrices \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\) represent \\(J\\) sets variables observed set \\(n\\) individuals. matrices \\(\\mathbf X_1, \\mathbf X_2, \\dots, \\mathbf X_J\\), called blocks must number rows, may (usually ) different numbers columns. RGCCA aims study relationships \\(J\\) blocks. constitutes general framework many multi-block component methods (see Tenenhaus Tenenhaus, 2011 ; Tenenhaus et al. 2017). combines power multi-block data analysis methods (maximization well identified criteria) flexibility PLS path modeling (researcher decides blocks connected ). Hence, use RGCCA requires construction (user specified) design matrix \\(\\mathbf C\\) characterizes connections blocks. Elements (symmetric) design matrix \\(\\mathbf C = (c_{jk})\\) positive (usually equal 1 blocks \\(j\\) \\(k\\) connected, 0 otherwise). rgcca() function implements monotone global convergent algorithm: bounded criteria maximized increases step iterative procedure hits, convergence, stationary point RGCCA optimization problem. Moreover, tau argument used, depending dimensionality block \\(\\mathbf X_j, j = 1, \\ldots, J\\), primal algorithm (\\(n \\geq p_j\\)) dual algorithm (\\(n < p_j\\)) used (see Tenenhaus et al. 2015). sparsity specified SGCCA, extends RGCCA address issue variable selection (Tenenhaus et al, 2014). Specifically, RGCCA combined L1-penalty gives rise Sparse GCCA (SGCCA). SGCCA algorithm similar RGCCA algorithm keeps convergence properties (.e. bounded criteria maximized increases step iterative procedure hits convergence stationary point). last, deflation strategy can used compute several block components (specified ncomp) per block. Within block, components weight vectors guaranteed orthogonal. noted numbers components per block can differ one block another. rgcca() function handle missing values (punctual blockwise missing structure) using algorithm described (Tenenhaus et al, 2005). Guidelines describing use RGCCA practice provided (Garali et al., 2018).","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"Garali , Adanyeguh IM, Ichou F, Perlbarg V, Seyer , Colsch B, Moszer , Guillemot V, Durr , Mochel F, Tenenhaus . (2018) strategy multimodal data integration: application biomarkers identification spinocerebellar ataxia. Briefings Bioinformatics. 19(6):1356-1369. Tenenhaus M., Tenenhaus . Groenen P. J. (2017). Regularized generalized canonical correlation analysis: framework sequential multiblock component methods. Psychometrika, 82(3), 737-777. Tenenhaus ., Philippe C. Frouin, V. (2015). Kernel generalized canonical correlation analysis. Computational Statistics Data Analysis, 90, 114-131. Tenenhaus ., Philippe C., Guillemot V., Le Cao K. ., Grill J. Frouin, V. (2014), Variable selection generalized canonical correlation analysis, Biostatistics, 15(3), pp. 569-583. Tenenhaus . Tenenhaus M., (2011). Regularized Generalized Canonical Correlation Analysis, Psychometrika, 76(2), pp 257-284. Tenenhaus, M., Vinzi, V. E., Chatelin, Y. M., & Lauro, C. (2005). PLS path modeling. Computational statistics & data analysis, 48(1), 159-205. Schafer J. Strimmer K. (2005). shrinkage approach large-scale covariance matrix estimation implications functional genomics. Statistical Applications Genetics Molecular Biology 4:32. Arnaud Gloaguen, Vincent Guillemot, Arthur Tenenhaus. efficient algorithm satisfy l1 l2 constraints. 49emes Journees de Statistique, May 2017, Avignon, France. (hal-01630744)","code":""},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regularized Generalized Canonical Correlation Analysis (RGCCA) β€” rgcca","text":"","code":"#################### # Example 1: RGCCA # #################### # Create the dataset data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) politic <- as.factor(apply(Russett[, 9:11], 1, which.max)) # RGCCA with default values : Blocks are fully connected, factorial scheme # tau = 1 for all blocks, one component per block. fit_rgcca <- rgcca(blocks = blocks) print(fit_rgcca) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point after 3 iterations. plot(fit_rgcca, type = \"weight\", block = 1:3) plot(fit_rgcca, type = \"sample\", block = 1:2, comp = rep(1, 2), resp = politic ) ############################################ # Example 2: RGCCA and multiple components # ############################################ # By default rgcca() returns orthogonal block components. fit_rgcca <- rgcca(blocks, method = \"rgcca\", connection = 1 - diag(3), superblock = FALSE, tau = rep(1, 3), ncomp = c(2, 2, 2), scheme = \"factorial\", comp_orth = TRUE, verbose = TRUE ) #> Computation of the RGCCA block components based on the factorial scheme #> Computation of the RGCCA block components #1 is under progress... #> Iter: 1 Fit: 0.71713961 Dif: 0.06767066 #> Iter: 2 Fit: 0.71721572 Dif: 0.00007611 #> Iter: 3 Fit: 0.71721585 Dif: 0.00000013 #> Iter: 4 Fit: 0.71721585 Dif: 0.00000000 #> The RGCCA algorithm converged to a stationary point after 3 iterations #> Computation of the RGCCA block components #2 is under progress... #> Iter: 1 Fit: 0.02960087 Dif: 0.01358225 #> Iter: 2 Fit: 0.02985623 Dif: 0.00025536 #> Iter: 3 Fit: 0.02985666 Dif: 0.00000043 #> Iter: 4 Fit: 0.02985666 Dif: 0.00000000 #> The RGCCA algorithm converged to a stationary point after 3 iterations print(fit_rgcca) #> Fitted RGCCA model. #> The algorithm converged to a stationnary point: #> \t- After 3 iterations for component 1. #> \t- After 3 iterations for component 2. plot(fit_rgcca, type = \"sample\", block = 1, comp = 1:2, resp = politic ) plot(fit_rgcca, type = \"weight\", block = 1:3, display_order = FALSE) ############################## # Example 3: MCOA with RGCCA # ############################## fit_rgcca <- rgcca(blocks, method = \"mcoa\", ncomp = 2) print(fit_rgcca) #> Fitted MCOA model. #> The algorithm converged to a stationnary point: #> \t- After 1 iterations for component 1. #> \t- After 1 iterations for component 2. # biplot representation plot(fit_rgcca, type = \"biplot\", block = 4, resp = politic) if (FALSE) { #################################### # Example 4: RGCCA and permutation # #################################### # Tune the model to find the best set of tau parameters. # By default, blocks are fully connected. set.seed(27) #favorite number perm_out <- rgcca_permutation(blocks, n_cores = 1, par_type = \"tau\", n_perms = 50 ) print(perm_out) plot(perm_out) # all the parameters were imported from a fitted permutation object fit_rgcca <- rgcca(perm_out) print(fit_rgcca) ####################################### # Example 5: RGCCA and dual algorithm # ####################################### # Download the dataset's package at http://biodev.cea.fr/sgcca/ and install # it from the package archive file. # You can do it with the following R commands: if (!(\"gliomaData\" %in% rownames(installed.packages()))) { destfile <- tempfile() download.file( \"http://biodev.cea.fr/sgcca/gliomaData_0.4.tar.gz\", destfile ) install.packages(destfile, repos = NULL, type = \"source\") } data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc sapply(blocks, NCOL) # rgcca algorithm using the dual formulation for X1 and X2 # and the dual formulation for X3. X3 is the group coding matrix associated # with the qualitative variable Loc. This block is considered # as response block and specified using the argument response. fit_rgcca <- rgcca( blocks = blocks, response = 3, method = \"rgcca\", tau = c(1, 1, 0), ncomp = 1, scheme = function(x) x^2, #factorial scheme, verbose = TRUE, ) fit_rgcca$primal_dual print(fit_rgcca) ########################################### # Example 6: RGCCA and variable selection # ########################################### # Variable selection and RGCCA : the sgcca algorithm fit_sgcca <- rgcca( blocks = blocks, method = \"sgcca\", response = 3, sparsity = c(.071, .2, 1), ncomp = 1, scheme = \"factorial\", verbose = TRUE, ) print(fit_sgcca) ############################################ # Example 7: RGCCA, multiple components # # and different penalties per component # ############################################ # S/RGCCA algorithm with multiple components and different # penalties for each components (-> sparsity is a matrix) fit_rgcca <- rgcca(blocks, response = 3, tau = matrix(c(.5, .5, 0, 1, 1, 0), nrow = 2, byrow = TRUE), ncomp = c(2, 2, 1), scheme = \"factorial\") print(fit_rgcca) # the same applies for SGCCA fit_sgcca <- rgcca(blocks, response = 3, sparsity = matrix(c(.071, 0.2, 1, 0.06, 0.15, 1), nrow = 2, byrow = TRUE), ncomp = c(2, 2, 1), scheme = \"factorial\") print(fit_sgcca) ################################################## # Example 8: Supervised mode en cross validation # ################################################## # Prediction of the location from GE and CGH # Tune sparsity values based on the cross-validated accuracy. set.seed(27) #favorite number cv_out <- rgcca_cv(blocks, response = 3, par_type = \"sparsity\", par_length = 10, ncomp = 1, prediction_model = \"lda\", metric = \"Accuracy\", k = 3, n_run = 5, n_cores = 2) print(cv_out) plot(cv_out, display_order = TRUE) # all the parameters were imported from the fitted cval object. fit_rgcca <- rgcca(cv_out) print(fit_rgcca) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"Bootstrap confidence intervals p-values evaluating significance/stability block-weight vectors produced S/RGCCA.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"","code":"rgcca_bootstrap( rgcca_res, n_boot = 100, n_cores = 1, balanced = TRUE, keep_all_variables = FALSE, verbose = TRUE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"rgcca_res fitted RGCCA object (see rgcca). n_boot number bootstrap samples (default: 100). n_cores number cores used parallelization. balanced logical value indicating balanced bootstrap procedure performed (default TRUE). keep_all_variables logical value indicating variables kept even null variance least one bootstrap sample (default FALSE). verbose logical value indicating progress bootstrap procedure reported.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"rgcca_bootstrap object can printed plotted. n_boot number bootstrap samples, returned use. rgcca RGCCA object fitted original data. bootstrap data.frame block weight vectors loadings computed bootstrap sample. stats data.frame statistics summarizing bootstrap data.frame.","code":""},{"path":[]},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_bootstrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bootstrap confidence intervals and p-values β€” rgcca_bootstrap","text":"","code":"# Bootstrap confidence intervals and p-values for RGCCA data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) fit_rgcca <- rgcca(blocks, ncomp = 1) boot_out <- rgcca_bootstrap(fit_rgcca, n_boot = 20, n_cores = 1, verbose = TRUE) #> Bootstrap samples sanity check... #> OK print(boot_out) #> RGCCA bootstrap object obtained with 20 bootstrap samples. plot(boot_out, type = \"weight\", block = 1:3, comp = 1, display_order = FALSE) if (FALSE) { # Download the dataset's package at http://biodev.cea.fr/sgcca/ and install # it from the package archive file. # You can do it with the following R commands: if (!(\"gliomaData\" %in% rownames(installed.packages()))) { destfile <- tempfile() download.file( \"http://biodev.cea.fr/sgcca/gliomaData_0.4.tar.gz\", destfile ) install.packages(destfile, repos = NULL, type = \"source\") } data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks [[3]] <- Loc fit_sgcca <- rgcca(blocks, response = 3, sparsity = c(.071, .2, 1), ncomp = 1, scheme = \"factorial\", verbose = TRUE ) print(fit_sgcca) boot_out <- rgcca_bootstrap(fit_sgcca, n_boot = 50, n_cores = 2) plot(boot_out, block = 1:2, type = \"weight\", comp = 1, n_mark = 300000, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":null,"dir":"Reference","previous_headings":"","what":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"function used select automatically \"sparsity\", \"tau\" \"ncomp\" cross-validation. function applies supervised setting, filling response argument therefore mandatory.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"","code":"rgcca_cv( blocks, connection = NULL, method = \"rgcca\", response = NULL, par_type = \"tau\", par_value = NULL, par_length = 10, validation = \"kfold\", prediction_model = \"lm\", metric = NULL, k = 5, n_run = 1, n_cores = 1, quiet = TRUE, superblock = FALSE, scale = TRUE, scale_block = TRUE, tol = 1e-08, scheme = \"factorial\", NA_method = \"na.ignore\", rgcca_res = NULL, tau = 1, ncomp = 1, sparsity = 1, init = \"svd\", bias = TRUE, verbose = TRUE, n_iter_max = 1000, comp_orth = TRUE, ... )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. connection (\\(J \\times J\\)) symmetric matrix describing network connections blocks (default value: 1-diag(J)). method string specifying multiblock component method consider. Possible values found using available_methods. response numerical value giving position response block. response argument filled, supervised mode automatically activated. par_type character giving parameter tune among \"sparsity\", \"tau\" \"ncomp\". par_value parameter values tested, either NULL, numerical vector size \\(J\\), matrix size par_length \\(\\times J\\). par_value NULL, par_length sets parameters generated uniformly minimum maximum possible values parameter defined par_type block. Minimum possible values 0 tau, \\(1/\\textrm{sqrt}(p_j)\\) sparsity, 1 ncomp. Maximum possible values 1 tau sparsity, \\(p_j\\) ncomp. par_value vector, overwrites maximum values taken range generated parameters. par_value matrix, par_value directly corresponds set tested parameters. par_length integer indicating number sets candidate parameters tested (par_value matrix). validation string specifying type validation among \"loo\" \"kfold\". small datasets (e.g. <30 samples), recommended use loo (leave-one-) procedure. prediction_model string giving model used prediction. Please see caret::modelLookup() list available models. metric string indicating metric interest. one following scores: classification: \"Accuracy\", \"Kappa\", \"F1\", \"Sensitivity\", \"Specificity\", \"Pos_Pred_Value\", \"Neg_Pred_Value\", \"Precision\", \"Recall\", \"Detection_Rate\", \"Balanced_Accuracy\". regression: \"RMSE\", \"MAE\". k integer giving number folds (validation = 'kfold'). n_run integer giving number Monte-Carlo Cross-Validation (MCCV) run (validation = 'kfold'). n_cores number cores used parallelization. quiet logical value indicating diagnostic messages reported. superblock logical value indicating superblock option used. scale logical value indicating variables standardized. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. tol stopping value convergence algorithm (default: tol = 1e-08). scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). rgcca_res fitted RGCCA object (see rgcca). tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). verbose logical value indicating progress algorithm reported computing. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors. ... Additional parameters passed prediction_model.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"rgcca_cv object can printed plotted. k integer giving number folds. n_run integer giving number MCCV. opt list containing options RGCCA model. metric string indicating metric used process cross-validation. cv matrix dimension par_length x (k x n_run). row cv corresponds one set candidate parameters. column cv corresponds cross-validated score specific fold specific run. call list input parameters RGCCA model. par_type type parameter tuned (either \"tau\", \"sparsity\", \"ncomp\"). best_params set parameters yields best cross-validated scores. params matrix reporting sets candidate parameters used cross-validation process. validation string specifying type validation (either \"loo\" \"kfold\"). stats data.frame containing various statistics (mean, sd, median, first quartile, third quartile) cross-validated score set parameters tested. classification boolean indicating model performs classification task. prediction_model string giving model used prediction.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"response block univariate. RGCCA components block used input variables predictive model (specified \"prediction_model\") predict response block. best combination parameters one best cross-validated score. multivariate response block, RGCCA components block used input variables predictive models (specified \"prediction_model\") predict column response block. cross-validated scores model averaged. best combination parameters one best averaged cross-validated score.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_cv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tune RGCCA parameters by cross-validation β€” rgcca_cv","text":"","code":"# Cross_validation for classification set.seed(27) #favorite number data(Russett) blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = as.factor(apply(Russett[, 9:11], 1, which.max)) ) cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_length = 5, prediction_model = \"lda\", #caret::modelLookup() metric = \"Accuracy\", k=3, n_run = 3, verbose = TRUE) print(cv_out) #> RGCCA cross-validation object obtained with 5 sets of parameters using 3 folds. #> Classification was performed using lda model. plot(cv_out) # A fitted cval object is given as output of the rgcca() function fit_opt = rgcca(cv_out) if (FALSE) { # Cross_validation for regression set.seed(27) #favorite number data(Russett) blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:8] ) cv_out <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0.6, 0.75, 0.8), prediction_model = \"lm\", #caret::modelLookup() metric = \"RMSE\", k=3, n_run = 5, verbose = TRUE) print(cv_out) plot(cv_out) fit_opt = rgcca(cv_out) data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc set.seed(27) # favorite number cv_out = rgcca_cv(blocks, response = 3, ncomp = 1, prediction_model = \"glmnet\", family = \"multinomial\", lambda = .001, par_type = \"sparsity\", par_value = c(.071, .2, 1), metric = \"Balanced_Accuracy\", n_cores = 2, ) print(cv_out) plot(cv_out, display_order = FALSE) cv_out = rgcca_cv(blocks, response = 3, ncomp = 1, prediction_model = \"glmnet\", family = \"multinomial\", lambda = .001, par_type = \"ncomp\", par_value = c(5, 5, 1), metric = \"Balanced_Accuracy\", n_cores = 2, ) print(cv_out) plot(cv_out, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":null,"dir":"Reference","previous_headings":"","what":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"function can used automatically select hyper-parameters (amount sparsity sgcca shrinkage parameters RGCCA). permutation-based strategy similar one proposed (Witten et al, 2009) implemented.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"","code":"rgcca_permutation( blocks, par_type = \"tau\", par_value = NULL, par_length = 10, n_perms = 20, n_cores = 1, quiet = TRUE, scale = TRUE, scale_block = TRUE, method = \"rgcca\", connection = NULL, scheme = \"factorial\", ncomp = 1, tau = 1, sparsity = 1, init = \"svd\", bias = TRUE, tol = 1e-08, response = NULL, superblock = FALSE, NA_method = \"na.ignore\", rgcca_res = NULL, verbose = TRUE, n_iter_max = 1000, comp_orth = TRUE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"blocks list contains \\(J\\) blocks variables \\(\\mathbf{X_1}, \\mathbf{X_2}, ..., \\mathbf{X_J}\\). Block \\(\\mathbf{X}_j\\) matrix dimension \\(n \\times p_j\\) \\(n\\) number observations \\(p_j\\) number variables. blocks argument can also fitted cval, rgcca permutation object. par_type character giving parameter tune among \"sparsity\", \"tau\" \"ncomp\". par_value parameter values tested, either NULL, numerical vector size \\(J\\), matrix size par_length \\(\\times J\\). par_value NULL, par_length sets parameters generated uniformly minimum maximum possible values parameter defined par_type block. Minimum possible values 0 tau, \\(1/\\textrm{sqrt}(p_j)\\) sparsity, 1 ncomp. Maximum possible values 1 tau sparsity, \\(p_j\\) ncomp. par_value vector, overwrites maximum values taken range generated parameters. par_value matrix, par_value directly corresponds set tested parameters. par_length integer indicating number sets candidate parameters tested (par_value matrix). n_perms number permutations set parameters (default 20). n_cores number cores used parallelization. quiet logical value indicating diagnostic messages reported. scale logical value indicating variables standardized. scale_block logical value string indicating block scaled. TRUE \"inertia\", block divided sum eigenvalues empirical covariance matrix. \"lambda1\", block divided square root highest eigenvalue empirical covariance matrix. standardization applied (scale = TRUE), block scaling applies standardized blocks. method string specifying multiblock component method consider. Possible values found using available_methods. connection (\\(J \\times J\\)) symmetric matrix describing network connections blocks (default value: 1-diag(J)). scheme string function specifying scheme function applied covariance maximization among \"horst\" (identity function), \"factorial\" (square function - default value), \"centroid\" (absolute value function). scheme function can continuously differentiable convex function possible design explicitly scheme function (e.g. function(x) x^4) argument function. See (Tenenhaus et al, 2017) details. ncomp numerical value vector length \\(J\\) indicating number components per block. single value provided, number components extracted every block. tau Either numerical value, numeric vector size \\(J\\), numeric matrix dimension \\(\\mathrm{max}(\\textrm{ncomp}) \\times J\\) containing values regularization parameters (default: tau = 1, block dimension), string equal \"optimal\". regularization parameters varies 0 (maximizing correlation) 1 (maximizing covariance). tau numerical value, tau identical across constraints applied block weight vectors. tau vector, tau[j] used constraints applied block weight vectors associated block \\(\\mathbf X_j\\). tau matrix, tau[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\). tau = \"optimal\" regularization parameters estimated block dimension using Schafer Strimmer (2005) analytical formula. tau parameters can also estimated using rgcca_permutation rgcca_cv. sparsity Either numerical value, numeric vector size \\(J\\) numeric matrix dimension \\(\\textrm{max}(\\textrm{ncomp}) \\times J\\) encoding L1 constraints applied block weight vectors. block \\(j\\), amount sparsity varies \\(1/\\textrm{sqrt}(p_j)\\) 1 (larger values sparsity correspond less penalization). sparsity numerical value, sparsity identical across constraints applied block weight vectors. sparsity vector, sparsity[j] identical across constraints applied block weight vectors associated block \\(\\mathbf X_j\\): $$ \\forall k, \\Vert a_{j,k} \\Vert_{1} \\le \\textrm{sparsity}[j] \\sqrt{p_j}. $$ sparsity matrix, sparsity[k, j] associated constraints applied kth block weight vector corresponding block \\(\\mathbf X_j\\): $$ \\Vert a_{j,k}\\Vert_{1} \\le \\textrm{sparsity}[k,j] \\sqrt{p_j}. $$ sparsity parameter can estimated using rgcca_permutation rgcca_cv. init string giving type initialization use RGCCA algorithm. either Singular Value Decompostion (\"svd\") random initialization (\"random\") (default: \"svd\"). bias logical value biased (\\(1/n\\)) unbiased (\\(1/(n-1)\\)) estimator variance/covariance (default: bias = TRUE). tol stopping value convergence algorithm (default: tol = 1e-08). response numerical value giving position response block. response argument filled, supervised mode automatically activated. superblock logical value indicating superblock option used. NA_method string indicating method used handling missing values (\"na.ignore\", \"na.omit\"). (default: \"na.ignore\"). \"na.omit\" corresponds perform RGCCA fully observed observations (observations missing values removed). \"na.ignore\" corresponds perform RGCCA algorithm available data (See Tenenhaus et al, 2005). rgcca_res fitted RGCCA object (see rgcca). verbose logical value indicating progress permutation procedure reported. n_iter_max Integer giving algorithm's maximum number iterations. comp_orth logical value indicating deflation lead orthogonal block components orthogonal block weight vectors.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"rgcca_permutation object can printed plotted. opt list indicating options RGCCA model used permutation. call list containing input parameters RGCCA model. par_type type parameter tuned (either \"tau\", \"sparsity\", \"ncomp\"). n_perms number permutations set candidate tuning parameters. best_params set tuning parameters yields highest Z-statistic. permcrit matrix permuted S/RGCCA criteria. ith row permcrit contains n_perms values S/RGCCA permuted criteria obtained ith set tuning parameters. params matrix reporting sets candidate parameters used permutation process. stats data.frame containing columns: sets candidate parameters, corresponding non permuted criteria, means standard deviations permuted criteria, Z-statistics p-values.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"tuning parameters selected using permutation scheme proposed (Witten et al, 2009). candidate tuning parameter value, following performed: (1) Repeat following n_perms times (n_perms large): () Randomly permuted rows \\(X_1\\),..., \\(X_J\\) create new blocks: \\(X_1^*\\),..., \\(X_J^*\\). (b) Run S/RGCCA permuted blocks \\(X_1^*\\),..., \\(X_J^*\\). (c) Record S/RGCCA criterion \\(t^*\\). (2) Run S/RGCCA original blocks \\(X_1\\),..., \\(X_J\\). (3) Record S/RGCCA criterion \\(t\\). (4) resulting p-value given \\(\\textrm{mean}(t^* > t)\\); , fraction \\(t^*\\) exceeds value \\(t\\) obtained real data. (5) resulting zstat defined \\(\\frac{t-\\textrm{mean}(t^*)}{\\textrm{sd}(t^*)}\\). , choose tuning parameter values gives highest value Step 5.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"Witten, D. M., Tibshirani, R., & Hastie, T. (2009). penalized matrix decomposition, applications sparse principal components canonical correlation analysis. Biostatistics, 10(3), 515-534.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_permutation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tune the S/RGCCA hyper-parameters by permutation β€” rgcca_permutation","text":"","code":"#################################### # Permutation based strategy for # # determining the best shrinkage # # parameters (par_type = \"tau\") # #################################### data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:11] ) C <- matrix(c( 0, 0, 1, 0, 0, 1, 1, 1, 0 ), 3, 3) # default value: 10 vectors from rep(0, length(blocks)) # to rep(1, length(blocks)), uniformly distributed. fit <- rgcca_permutation(blocks, connection = C, par_type = \"tau\", par_length = 10, n_perms = 2, n_cores = 1, verbose = TRUE ) print(fit) #> RGCCA permutation object obtained with 10 sets of parameters and 2 permutations each. plot(fit) fit$best_params #> agriculture industry politic #> 1 1 1 if (FALSE) { # It is possible to define explicitly K combinations of shrinkage # parameters to be tested and in that case a matrix of dimension KxJ is # required. Each row of this matrix corresponds to one specific set of # shrinkage parameters. par_value <- matrix(c( 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, sapply(blocks, RGCCA:::tau.estimate), 1, 1, 1 ), 5, 3, byrow = TRUE) perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"tau\", par_value = par_value, n_perms = 5, n_cores = 1 ) print(perm.out) plot(perm.out) # with superblock perm.out <- rgcca_permutation(blocks, par_type = \"tau\", superblock = TRUE, scale = TRUE, scale_block = FALSE, n_perms = 5, n_cores = 1 ) print(perm.out) plot(perm.out) # used a fitted rgcca_permutation object as input of the rgcca function fit.rgcca <- rgcca(perm.out) print(fit.rgcca) ###################################### # Permutation based strategy for # # determining the best sparsity # # parameters (par_type = \"sparsity\") # ###################################### # defaut value: 10 vectors from minimum values # (1/sqrt(ncol(X1)), ..., 1/sqrt(ncol(XJ)) # to rep(1, J), uniformly distributed. perm.out <- rgcca_permutation(blocks, par_type = \"sparsity\", n_perms = 50, n_cores = 1 ) print(perm.out) plot(perm.out) perm.out$best_params # when par_value is a vector of length J. Each element of the vector # indicates the maximum value of sparsity to be considered for each block. # par_length (default value = 10) vectors from minimum values # (1/sqrt(ncol(X1)), ..., 1/sqrt(ncol(XJ)) to maximum values, uniformly # distributed, are then considered. perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"sparsity\", par_value = c(0.6, 0.75, 0.5), par_length = 7, n_perms = 20, n_cores = 1, tol = 1e-3 ) print(perm.out) plot(perm.out) perm.out$best_params # when par_value is a scalar, the same maximum value is applied # for each block perm.out <- rgcca_permutation(blocks, connection = C, par_type = \"sparsity\", par_value = 0.8, par_length = 5, n_perms = 10, n_cores = 1 ) perm.out$params ###################################### # Speed up the permutation procedure # ###################################### # The rgcca_permutation function can be quite time-consuming. Since # approximate estimates of the block weight vectors are acceptable in this # case, it is possible to reduce the value of the tolerance (tol argument) # of the RGCCA algorithm to speed up the permutation procedure. # data(\"ge_cgh_locIGR\", package = \"gliomaData\") A <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) A[[3]] <- A[[3]][, -3] C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) # check dimensions of the blocks sapply(A, dim) par_value <- matrix(c( seq(0.1, 1, by = 0.1), seq(0.1, 1, by = 0.1), rep(0, 10) ), 10, 3, byrow = FALSE) fit <- rgcca_permutation(A, connection = C, par_type = \"tau\", par_value = par_value, par_length = 10, n_perms = 10, n_cores = 1, tol = 1e-2 ) print(fit) plot(fit) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Make predictions using RGCCA β€” rgcca_predict","title":"Make predictions using RGCCA β€” rgcca_predict","text":"function aims make predictions combining fitted RGCCA object prediction model classification regression.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make predictions using RGCCA β€” rgcca_predict","text":"","code":"rgcca_predict( rgcca_res, blocks_test = rgcca_res$call$blocks, prediction_model = \"lm\", metric = NULL, ... )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make predictions using RGCCA β€” rgcca_predict","text":"rgcca_res fitted RGCCA object (see rgcca). blocks_test list test blocks aim predict associated response block. test response block present among blocks_test, metrics computed comparing predictions true values. prediction_model string giving model used prediction. Please see caret::modelLookup() list available models. metric string indicating metric interest. one following scores: classification: \"Accuracy\", \"Kappa\", \"F1\", \"Sensitivity\", \"Specificity\", \"Pos_Pred_Value\", \"Neg_Pred_Value\", \"Precision\", \"Recall\", \"Detection_Rate\", \"Balanced_Accuracy\". regression: \"RMSE\", \"MAE\". ... Additional parameters passed prediction_model.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make predictions using RGCCA β€” rgcca_predict","text":"list containing following elements: score score obtained testing block. NA test block missing. model list models trained using caret make predictions compute scores. metric list data.frames containing scores obtained training testing sets. confusion list containing NA regression tasks. Otherwise, confusion summary produced caret train test. projection list matrices containing projections test blocks using canonical components fitted RGCCA object. response block projected. prediction list data.frames predictions test train response blocks.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make predictions using RGCCA β€” rgcca_predict","text":"","code":"data(\"Russett\") blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:8] ) X_train <- lapply(blocks, function(x) x[seq(1, 30), ]) X_test <- lapply(blocks, function(x) x[seq(31, 47), ]) fit <- rgcca(X_train, tau = 1, ncomp = c(3, 2, 3), response = 3 ) res <- rgcca_predict(fit, X_test)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the most stable variables with SGCCA β€” rgcca_stability","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"function can used identify stable variables identified relevant SGCCA. Variable Importance Projection (VIP) based criterion used identify stable variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"","code":"rgcca_stability( rgcca_res, keep = vapply(rgcca_res$a, function(x) mean(x != 0), FUN.VALUE = 1), n_boot = 100, n_cores = 1, verbose = TRUE, balanced = TRUE, keep_all_variables = FALSE )"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"rgcca_res fitted RGCCA object (see rgcca). keep numeric vector indicating proportion variables per block select. n_boot number bootstrap samples (default: 100). n_cores number cores parallelization. verbose logical value indicating progress procedure reported. balanced logical value indicating balanced bootstrap procedure performed (default TRUE). keep_all_variables logical value indicating variables kept even null variance least one bootstrap sample (default FALSE).","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"rgcca_stability object can printed plotted. top data.frame giving indicator (VIP) variables ranked. n_boot number bootstrap samples, returned use. keepVar indices stable variables. bootstrap data.frame block weight vectors computed bootstrap sample. rgcca_res RGCCA object fitted stable variables.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_stability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the most stable variables with SGCCA β€” rgcca_stability","text":"","code":"if (FALSE) { ########################### # stability and bootstrap # ########################### data(\"ge_cgh_locIGR\", package = \"gliomaData\") blocks <- ge_cgh_locIGR$multiblocks Loc <- factor(ge_cgh_locIGR$y) levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y) blocks[[3]] <- Loc fit_sgcca <- rgcca(blocks, sparsity = c(.071, .2, 1), ncomp = c(1, 1, 1), scheme = \"centroid\", verbose = TRUE, response = 3 ) boot_out <- rgcca_bootstrap(fit_sgcca, n_boot = 100, n_cores = 1) fit_stab <- rgcca_stability(fit_sgcca, keep = sapply(fit_sgcca$a, function(x) mean(x != 0)), n_cores = 1, n_boot = 10, verbose = TRUE ) boot_out <- rgcca_bootstrap( fit_stab, n_boot = 500, n_cores = 1, verbose = TRUE ) plot(boot_out, block = 1:2, n_mark = 2000, display_order = FALSE) }"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":null,"dir":"Reference","previous_headings":"","what":"Reduce dimensionality using RGCCA β€” rgcca_transform","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"function projects testing blocks using block weight vectors fitted RGCCA object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"","code":"rgcca_transform(rgcca_res, blocks_test = rgcca_res$call$blocks)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"rgcca_res fitted RGCCA object (see rgcca). blocks_test list blocks (data.frame matrix) projected.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"list matrices containing projections test blocks using block weight vectors fitted RGCCA object.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/rgcca_transform.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reduce dimensionality using RGCCA β€” rgcca_transform","text":"","code":"data(\"Russett\") blocks <- list( agriculture = Russett[, 1:3], industry = Russett[, 4:5], politic = Russett[, 6:11]) Xtrain <- lapply(blocks, function(x) x[1:32, ]) Xtest <- lapply(blocks, function(x) x[33:47, ]) fit_rgcca <- rgcca(Xtrain, ncomp = 2) projection <- rgcca_transform(fit_rgcca, Xtest)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"`summary.rgcca()` summarizes fitted RGCCA object. information model displayed like model parameters criterion. `summary.rgcca_cv()` summarizes fitted rgcca_cv object. Parameters analysis, tuning parameters statistics set parameters displayed. `summary.rgcca_permutation()` summarizes fitted rgcca_permutation object. Parameters analysis, tuning parameters statistics set parameters displayed. `summary.rgcca_bootstrap()` summarizes fitted rgcca_bootstrap object. Parameters analysis bootstrap statistics displayed. `summary.rgcca_stability()` calls `summary.rgcca()` fitted RGCCA model returned `rgcca_stability()`.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"","code":"# S3 method for rgcca summary(object, ...) # S3 method for rgcca_cv summary(object, type = c(\"sd\", \"quantile\"), ...) # S3 method for rgcca_permutation summary(object, ...) # S3 method for rgcca_bootstrap summary( object, block = seq_along(object$rgcca$call$blocks), comp = 1, type = c(\"weights\", \"loadings\"), empirical = TRUE, display_order = FALSE, adj.method = \"fdr\", ... ) # S3 method for rgcca_stability summary(object, ...)"},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"object object summarized (output functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability). ... arguments passed methods (displaying matrices). type character string indicating type summarized object (see details). block numeric corresponding block(s) summarize. comp numeric vector indicating component(s) consider. empirical logical value indicating bootstrap confidence intervals p-values derived empirical distribution. (default: TRUE) display_order logical value ordering variables. TRUE, variables ordered highest lowest absolute value. FALSE, block order used. Default TRUE. adj.method string indicating method used adjust p-values. must method handled p.adjust function. Default \"fdr\".","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"none","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"Argument type can take two values `summary.cval`: \"sd\" (default): mean values cross-validated scores reported, well means plus minus standard deviations. \"quantiles\": median values, 25% 75% quantiles cross-validated scores reported. Argument type can take two values `summary.bootstrap`: \"weights\" (default): statistics block-weight vectors reported. \"loadings\": statistics block-loading vectors reported.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/reference/summary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary of a fitted object from the RGCCA package β€” summary.rgcca","text":"","code":"## Summary of an rgcca object data(Russett) blocks <- list( agriculture = Russett[, seq(3)], industry = Russett[, 4:5], politic = Russett[, 6:8] ) C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3) res <- rgcca(blocks, connection = C, ncomp = rep(2, 3), tau = c(1, 1, 1), scheme = \"factorial\", scale = TRUE, verbose = FALSE ) summary(res) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block='inertia', #> init='svd', bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(2,2,2), #> response=NULL, comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 0 1 #> industry 0 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> Sum_{j,k} c_jk g(cov(X_j a_j, X_k a_k) = 0.5346 #> #> The regularization parameter used for agriculture is: 1 #> The regularization parameter used for industry is: 1 #> The regularization parameter used for politic is: 1 #> ## Summary of an rgcca_cv object res <- rgcca_cv(blocks, response = 3, method = \"rgcca\", par_type = \"tau\", par_value = c(0, 0.2, 0.3), n_run = 1, n_cores = 1, verbose = TRUE ) summary(res) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block=TRUE, init='svd', #> bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(1,1,1), response=3, #> comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 0 1 #> industry 0 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Tuning parameters (tau) used: #> agriculture industry politic #> 1 0 0.200 0.300 #> 2 0 0.178 0.267 #> 3 0 0.156 0.233 #> 4 0 0.133 0.200 #> 5 0 0.111 0.167 #> 6 0 0.089 0.133 #> 7 0 0.067 0.100 #> 8 0 0.044 0.067 #> 9 0 0.022 0.033 #> 10 0 0.000 0.000 #> #> Validation: kfold with 5 folds and 1 run(s)) #> Prediction model: lm #> #> Tuning parameters Mean RMSE Sd #> 1 Set 1 1.10 0.216 #> 2 Set 2 1.11 0.215 #> 3 Set 3 1.11 0.214 #> 4 Set 4 1.11 0.212 #> 5 Set 5 1.11 0.210 #> 6 Set 6 1.11 0.208 #> 7 Set 7 1.11 0.206 #> 8 Set 8 1.12 0.203 #> 9 Set 9 1.12 0.199 #> 10 Set 10 1.12 0.197 #> #> The best combination is: Set 1 for a mean RMSE of 1.1 ## Summary of an rgcca_permutation object perm.out <- rgcca_permutation(blocks, par_type = \"tau\", n_perms = 5, n_cores = 1, verbose = TRUE ) summary(perm.out) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block=TRUE, init='svd', #> bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(1,1,1), response=NULL, #> comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 1 1 #> industry 1 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Tuning parameters (tau) used: #> agriculture industry politic #> 1 1.000 1.000 1.000 #> 2 0.889 0.889 0.889 #> 3 0.778 0.778 0.778 #> 4 0.667 0.667 0.667 #> 5 0.556 0.556 0.556 #> 6 0.444 0.444 0.444 #> 7 0.333 0.333 0.333 #> 8 0.222 0.222 0.222 #> 9 0.111 0.111 0.111 #> 10 0.000 0.000 0.000 #> #> Tuning parameters Criterion Permuted criterion sd zstat p-value #> 1 1.00/1.00/1.00 0.644 0.0948 0.0651 8.43 0 #> 2 0.89/0.89/0.89 0.685 0.1021 0.0693 8.41 0 #> 3 0.78/0.78/0.78 0.731 0.1108 0.0740 8.39 0 #> 4 0.67/0.67/0.67 0.783 0.1211 0.0792 8.36 0 #> 5 0.56/0.56/0.56 0.842 0.1336 0.0851 8.33 0 #> 6 0.44/0.44/0.44 0.910 0.1495 0.0916 8.31 0 #> 7 0.33/0.33/0.33 0.990 0.1705 0.0986 8.31 0 #> 8 0.22/0.22/0.22 1.085 0.2006 0.1055 8.38 0 #> 9 0.11/0.11/0.11 1.204 0.2510 0.1081 8.82 0 #> 10 0.00/0.00/0.00 1.429 0.4167 0.0919 11.01 0 #> The best combination is: 0.00/0.00/0.00 for a z score of 11 and a p-value of 0 ## Summary of an rgcca_bootstrap object fit.rgcca <- rgcca(blocks, ncomp = c(2, 1, 2)) boot.out <- rgcca_bootstrap(fit.rgcca, n_boot = 20, n_cores = 2, verbose = TRUE) #> Bootstrap samples sanity check... #> OK summary(boot.out) #> Call: method='rgcca', superblock=FALSE, scale=TRUE, scale_block='inertia', #> init='svd', bias=TRUE, tol=1e-08, NA_method='na.ignore', ncomp=c(2,1,2), #> response=NULL, comp_orth=TRUE #> There are J = 3 blocks. #> The design matrix is: #> agriculture industry politic #> agriculture 0 1 1 #> industry 1 0 1 #> politic 1 1 0 #> #> The factorial scheme is used. #> #> Extracted statistics from 20 bootstrap samples. #> Block-weight vectors for component 1: #> estimate mean sd lower_bound upper_bound bootstrap_ratio pval #> gini 0.661 0.6424 0.0537 0.54401 0.717 12.300 0.0000 #> farm 0.742 0.7280 0.0402 0.64648 0.790 18.444 0.0000 #> rent 0.117 0.0892 0.2180 -0.33455 0.387 0.538 0.5385 #> gnpr 0.732 0.7266 0.0497 0.65407 0.821 14.715 0.0000 #> labo -0.682 -0.6832 0.0555 -0.75615 -0.569 -12.288 0.0000 #> inst 0.249 0.2524 0.1372 0.00582 0.445 1.816 0.0526 #> ecks 0.661 0.6462 0.0776 0.45913 0.745 8.520 0.0000 #> death 0.708 0.7000 0.0737 0.60750 0.859 9.605 0.0000 #> adjust.pval #> gini 0.0000 #> farm 0.0000 #> rent 0.5799 #> gnpr 0.0000 #> labo 0.0000 #> inst 0.0819 #> ecks 0.0000 #> death 0.0000 #> ## Summary of an rgcca_stability object fit.sgcca <- rgcca(blocks, sparsity = c(.8, .9, .6)) res <- rgcca_stability(fit.sgcca, n_boot = 10, verbose = TRUE) #> Bootstrap samples sanity check... #> OK summary(res) #> Fitted SGCCA model. #> The algorithm converged to a stationnary point after 2 iterations. #>"},{"path":"https://rgcca-factory.github.io/RGCCA/news/index.html","id":"rgcca-302","dir":"Changelog","previous_headings":"","what":"RGCCA 3.0.2","title":"RGCCA 3.0.2","text":"CRAN release: 2023-10-09 Rename RGCCA classes prefix β€œrgcca_”. Merge documentation print functions. Merge documentation plot functions. Environment variable TEST_SNAPSHOTS must set β€œTRUE” snapshots evaluated.","code":""},{"path":"https://rgcca-factory.github.io/RGCCA/news/index.html","id":"rgcca-300","dir":"Changelog","previous_headings":"","what":"RGCCA 3.0.0","title":"RGCCA 3.0.0","text":"CRAN release: 2023-04-27 Added NEWS.md file track changes package. Many differences introduced since last version published CRAN. list important ones: * function rgcca now main entry point package. * Many well-known methods multiblock literature now directly available setting method argument rgcca function. list methods can found using available_methods function. * Arguments C rgcca function now deprecated. blocks connection used instead. * Small utility functions longer exported. * Functions rgcca_transform rgcca_predict added. allow applying fitted RGCCA models project new subjects onto learned subspaces make predictions response blocks using caret predictive models. * Functions rgcca_cv rgcca_permutation added. allow finding best parameters models based cross-validation permutation criterion. * function rgcca_bootstrap added evaluate weights model using bootstrap procedure. * function rgcca_stability added evaluate stability variable selection performed SGCCA. * Print plot functions added outputs functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, rgcca_stability.","code":""}]