networkVar {visCorVar} | R Documentation |
Network of correlated variables
networkVar( res_compute_mat_similarity, names_block_variables, names_response_variables, cutoff = 0 )
res_compute_mat_similarity |
res_compute_mat_similarity is the output of the function computeMatSimilarity |
names_block_variables |
type : character vector. names_block_variables contains the names of selected block variables. |
names_response_variables |
type : charcater vector. names_response_variables contains the names of the response variables which will be in the network. |
cutoff |
type : numeric. If the similarity between two selected block variables is larger than cutoff in absolute value, these variable will be in the network. |
The function networkVar create a network of correlated variables. The variables of interest and the response variables will be in the network. If the similarity between two selected block variables is larger than cutoff in absolute value, these variable will be in the network.
a list containing
gR type : igraph graph. This object contains all the information needed to create a network. This object can be exported in graphml format.
cutoff type : numeric. An input parameter of the function networkVar.
library(RColorBrewer) 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) list_cor_comp_selected_var_resp_var = res_matCorAddVar$list_cor_comp_selected_var_resp_var list_vec_index_block_select = res_matCorAddVar$list_vec_index_block_select mat_cor_comp1 = res_matCorAddVar$mat_cor_comp1 mat_cor_comp2 = res_matCorAddVar$mat_cor_comp2 res_compute_mat_similarity = computeMatSimilarity(res_matCorAddVar) names_blocks = c("X1", "X3") names_response_variables = c("A", "B") comp = 1:2 names_block_variables = circleCor(list_cor_comp_selected_var_resp_var, list_vec_index_block_select, mat_cor_comp1, mat_cor_comp2, names_blocks, names_response_variables, comp, 0.85, -1, 1, -1, 1, colorRampPalette(brewer.pal(9, "Spectral"))(dim(mat_cor_comp1)[1] + 1), rad.in = 0.5, 0.7, 0.8, c(1.2, 0), 20) names_resp_var2 = c("A") res_networkVar = networkVar(res_compute_mat_similarity, names_block_variables, names_resp_var2, 0)