Skip to contents

`summary.rgcca()` summarizes a fitted RGCCA object. Some information about the model are displayed like model parameters or criterion.

`summary.rgcca_cv()` summarizes a fitted rgcca_cv object. Parameters of the analysis, tuning parameters and statistics for each set of parameters are displayed.

`summary.rgcca_permutation()` summarizes a fitted rgcca_permutation object. Parameters of the analysis, tuning parameters and statistics for each set of parameters are displayed.

`summary.rgcca_bootstrap()` summarizes a fitted rgcca_bootstrap object. Parameters of the analysis and bootstrap statistics are displayed.

`summary.rgcca_stability()` calls `summary.rgcca()` on the fitted RGCCA model returned by `rgcca_stability()`.

Usage

# S3 method for class 'rgcca'
summary(object, ...)

# S3 method for class 'rgcca_cv'
summary(object, type = c("sd", "quantile"), ...)

# S3 method for class 'rgcca_permutation'
summary(object, ...)

# S3 method for class '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 class 'rgcca_stability'
summary(object, ...)

Arguments

object

An object to be summarized (output of functions rgcca, rgcca_cv, rgcca_permutation, rgcca_bootstrap, or rgcca_stability).

...

Further arguments passed to other methods (for the displaying of matrices).

type

A character string indicating the type of the summarized object (see details).

block

A numeric corresponding to the block(s) to summarize.

comp

A numeric vector indicating the component(s) to consider.

empirical

A logical value indicating if the bootstrap confidence intervals and p-values are derived from the empirical distribution. (default: TRUE)

display_order

A logical value for ordering the variables. If TRUE, variables are ordered from highest to lowest absolute value. If FALSE, the block order is used. Default is TRUE.

adj.method

A string indicating the method used to adjust the p-values. It must be a method handled by the p.adjust function. Default is "fdr".

Value

none

Details

Argument type can take two values in `summary.cval`:

  • "sd" (default): mean values of the cross-validated scores are reported, as well as means plus or minus standard deviations.

  • "quantiles": median values, 25% and 75% quantiles of the cross-validated scores are reported.

Argument type can take two values in `summary.bootstrap`:

  • "weights" (default): statistics about the block-weight vectors are reported.

  • "loadings": statistics about the block-loading vectors are reported.

Examples

## 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.15 0.175
#> 2              Set 2      1.16 0.175
#> 3              Set 3      1.16 0.175
#> 4              Set 4      1.16 0.175
#> 5              Set 5      1.16 0.176
#> 6              Set 6      1.16 0.176
#> 7              Set 7      1.16 0.176
#> 8              Set 8      1.16 0.177
#> 9              Set 9      1.16 0.177
#> 10            Set 10      1.16 0.178
#> 
#> The best combination is: Set 1 for a mean RMSE of 1.15

## 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.102 0.0523 10.37       0
#> 2     0.89/0.89/0.89     0.685              0.110 0.0560 10.26       0
#> 3     0.78/0.78/0.78     0.731              0.120 0.0603 10.14       0
#> 4     0.67/0.67/0.67     0.783              0.132 0.0652  9.99       0
#> 5     0.56/0.56/0.56     0.842              0.146 0.0709  9.82       0
#> 6     0.44/0.44/0.44     0.910              0.165 0.0775  9.62       0
#> 7     0.33/0.33/0.33     0.990              0.190 0.0851  9.40       0
#> 8     0.22/0.22/0.22     1.085              0.227 0.0936  9.16       0
#> 9     0.11/0.11/0.11     1.204              0.290 0.1023  8.94       0
#> 10    0.00/0.00/0.00     1.429              0.604 0.1147  7.19       0
#> The best combination is: 1.00/1.00/1.00 for a z score of 10.4 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)
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.604 0.1028    0.355318       0.720           6.426 0.0000
#> farm     0.742  0.735 0.0566    0.619324       0.810          13.110 0.0000
#> rent     0.117  0.159 0.2459   -0.416335       0.438           0.477 0.1765
#> gnpr     0.732  0.704 0.0477    0.644664       0.798          15.338 0.0000
#> labo    -0.682 -0.707 0.0499   -0.764417      -0.603         -13.650 0.0000
#> inst     0.249  0.252 0.1553   -0.000626       0.541           1.604 0.0526
#> ecks     0.661  0.655 0.0742    0.522229       0.768           8.908 0.0000
#> death    0.708  0.688 0.0836    0.530259       0.817           8.467 0.0000
#>       adjust.pval
#> gini        0.000
#> farm        0.000
#> rent        0.206
#> gnpr        0.000
#> labo        0.000
#> inst        0.067
#> ecks        0.000
#> death       0.000
#> 

## 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)
summary(res)
#> Fitted SGCCA model. 
#> The algorithm converged to a stationnary point after 2 iterations.
#>