data_list: A list of dataframes, one by group. Each dataframe must be structured in the same way (the same variables for each group). This needs to be the same input as was used for the original Joint Graphical Lasso network estimated with EstimateGroupNetwork.
groupNetwork: The to-be-bootstrapped network estimated with the EstimateGroupNetwork function. Importantly, the initial Joint Graphical Lasso needs to be estimated with simplifyOutput = FALSE.
nboots: The number of bootstraps to-be-conducted.
bootSeed: An optional random seed for ensuring replicability of the results.
...: All further arguments need to be specified as done for the initial computation of the EstimateGroupNetwork function. Here all arguments apply and have the default values of function EstimateGroupNetwork, with the exceptions being the arguments inputType = "list.of.dataframes", simplifyOutput = FALSE, and labels, as node labels are taken directly from the original network. These arguments are set by default.
Details
Some of the code for the cross-validation procedure was adapted from package parcor. Some of the code was inspired by package qgraph.
Returns
The output of GroupNetworkBoot returns a list with the following elements: - data: The original list of dataframes supplied to the function
sample: A list including the original output from EstimateGroupNetwork
boot: A list of matrices, each including a bootstrapped network
References
Danaher, P (2013). JGL: Performs the Joint Graphical Lasso for sparse inverse covariance estimation on multiple classes. R package version 2.3. https://CRAN.R-project.org/package=JGL Danaher, P., Wang, P., and Witten, D. M. (2014). The joint graphical lasso for inverse covariance estimation across multiple classes. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(2), 373-397. http://doi.org/10.1111/rssb.12033
## Not run:## Load packages:library("psych")library("EstimateGroupNetwork")# In this example, the BFI network of males and females are compared for the subset of# Agreeableness items# Load BFI datadata(bfi)## The bfi data is subset to Agreeableness items only for the first 500 individuals to decrease# computational timebfi <- bfi[, c(paste("A",1:5, sep =""),"gender")]# remove observations with missing values on items or genderbfi <- na.omit(bfi)# Create list split by genderbfi_list <- list(males = bfi[bfi$gender ==1,1:5], females = bfi[bfi$gender ==2,1:5])# Estimate JGL:bfi_net <- EstimateGroupNetwork(bfi_list, inputType ="list.of.dataframes", simplifyOutput =FALSE)# Bootstrap network 10 times (this will take a few minutes)boot_bfi_net <- GroupNetworkBoot(data_list = bfi_list, groupNetwork = bfi_net, nboots =10, bootSeed =1234, ncores =1)# use BootTable to obtain a table with information for each boostrapped edgeBootTable(boot_bfi_net)## Use GroupBootPlot to obtain plots as a list with each group plot as one elementGroupBootPlot(boot_bfi_net)## Get plot for a subset of edges (here: all edges including A1). Also check GroupnamesGroupBootPlot(boot_bfi_net, edges.x ="A1", edges.y = c("A2","A3","A4","A5"), GroupNames = c("Females","Males"), GroupNamesCheck =TRUE, legend.position ="top")## End(Not run)