matCorAddVar {visCorVar} | R Documentation |
Determines which blocks can be overlaid. Performs the computation of the correlations between the components and the selected block variables, the response variables and the variables of interest.
matCorAddVar(res_block_splsda, block_Y, cutoff_comp, var_interest = NULL, comp)
res_block_splsda |
object of class sgccda. Output of the function block.splsda. |
block_Y |
matrix of size n*(number of response variables). The coefficient (i, j) of block_Y is equal to 1 if the ith sample tallies with the jth response variable. |
cutoff_comp |
numeric. If for two blocks, the correlation between the comp[1] component of a block and the comp[1] component of the other block is greater than cutoff_comp in absolue value and the correlation between the comp[2] component of a block and the comp[2] component of the other block is greater than cutoff_comp in absolue value, the correlation circles for these two blocks can be overlaid. |
var_interest |
(optional) characters vector. va_interest contains the variables of interest that will be added in the network. |
comp |
integer vector. comp contains the indices of the components for which the computation of the correlations between the components and the selected block variables, the response variables and the variables of interest is performed. Default comp = 1:2 . |
The function matCorAddVar first computes the correlation matrix for the comp[1] components of the blocks and the comp[2] components of the blocks. These two matrices enable then to determine group of blocks for which the correlation circles can be overlaid and all the combinations of group of blocks that can be overlaid. Finally, for each group of blocks, this function computes the correlations between the components (whose indices are in comp) and the selected block variables, the response variables and variables of interest (optional).
a list containing
mat_cor_comp1 type : matrix. mat_cor_comp1 is the correlation matric between the components of index comp[1].
mat_cor_comp2 type : matrix. mat_cor_comp1 is the correlation matric between the components of index comp[2].
cutoff_comp type numeric. Input parameter of the function matCorAddVar.
comp type : integer vector. Input parameter of the function matCorAddVar.
list_vec_index_block_select list of integer. This list contains the indices of the blocks whose correlation circles can be overlaid.
list_vec_names_blocks. list of characters vectors. list_vec_names_blocks contains all the possible combinations of the blocks whose correlation circles can be overlaid.
list_cor_comp_selected_var_resp_var type list of dataframes. For the ith group of blocks, list_cor_comp_selected_var_resp_var. contains the correlations between the components (whose indices are in comp) and the selected block variables and the response variables.
res_compute_cor_var_interest. type : list. The first element of this list contains the variables of interest. The second element of this list contains a list of dataframes. The ith element of this list contains, for each variable of interest, the correlation between this variable of interest and the components (whose indices are in comp).
res_block_splsda. type : sgccda. Output of the function block.splsda .
load(system.file("extdata", "res_data_integration.rda", package="visCorVar")) load(system.file("extdata", "block_Y.rda", package="visCorVar")) load(system.file("extdata", "var_interest.rda", package="visCorVar")) comp = 1:2 cutoff_comp = 0.8 res_matCorAddVar = matCorAddVar(res_data_integration, block_Y, cutoff_comp, var_interest, comp)