Description Usage Arguments Value Author(s) References See Also Examples

This function can be used to bootstrap network estimation methods so that the spread of parameter and centrality estimates can be assessed. Most important methods are `type = 'nonparametric'`

for the non-parametric bootstrap and `type = 'case'`

for the case-dropping bootstrap. See also Epskamp, Borsboom and Fried (2016) for more details.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
bootnet(data, nBoots = 1000, default = c("none", "EBICglasso", "pcor","IsingFit",
"IsingSampler", "huge","adalasso","mgm"), type =
c("nonparametric", "parametric", "node", "person",
"jackknife", "case"), nCores = 1, statistics = c("edge"
,"strength","closeness","betweenness"), model = c("detect",
"GGM", "Ising"), fun, prepFun, prepArgs, estFun, estArgs,
graphFun, graphArgs, intFun, intArgs, verbose = TRUE,
construct = c("default", "function", "arguments"), labels,
alpha = 1, caseMin = 0.05, caseMax = 0.75, caseN = 10,
subNodes = 2:(ncol(data) - 1), subCases = round((1 -
seq(caseMin, caseMax, length = caseN)) * nrow(data)),
computeCentrality = TRUE, propBoot = 1, replacement =
TRUE, graph, sampleSize, intercepts, weighted, signed,
directed, ...)
``` |

`data` |
A data frame or matrix containing the raw data. Must be numeric, integer or ordered factors. |

`nBoots` |
Number of bootstraps |

`default` |
A string indicating the method to use. See documentation at |

`type` |
The kind of bootstrap method to use. |

`nCores` |
Number of cores to use in computing results. Set to 1 to not use parallel computing. |

`statistics` |
Vector indicating which statistics to store. Can contain |

`model` |
The modeling framework to use. Automatically detects if data is binary or not. |

`fun` |
A custom estimation function, when no default set is used. This must be a function that takes the data as input (first argument) and returns either a weights matrix or a list containing the elements |

`prepFun` |
See documentation at |

`prepArgs` |
See documentation at |

`estFun` |
See documentation at |

`estArgs` |
See documentation at |

`graphFun` |
See documentation at |

`graphArgs` |
See documentation at |

`intFun` |
See documentation at |

`intArgs` |
See documentation at |

`verbose` |
Logical. Should progress of the function be printed to the console? |

`labels` |
A character vector containing the node labels. If omitted the column names of the data are used. |

`alpha` |
The centrality tuning parameter as used in |

`subNodes` |
Range of nodes to sample in node-drop bootstrap |

`caseMin` |
Minimum proportion of cases to drop when |

`caseMax` |
Maximum proportion of cases to drop when |

`caseN` |
Number of sampling levels to test when |

`subCases` |
Range of persons to sample in person-drop bootstrap |

`computeCentrality` |
Logical, should centrality be computed? |

`propBoot` |
Proportion of persons to sample in bootstraps. Set to lower than 1 for m out of n bootstrap |

`replacement` |
Logical, should replacement be used in bootstrap sampling? |

`graph` |
A given network structure to use in parametric bootstrap. |

`sampleSize` |
The samplesize to use in parametric bootstrap. |

`intercepts` |
Intercepts to use in parametric bootstrap. |

`construct` |
How to construct the estimator? Set to |

`weighted` |
Logical, should the analyzed network be weighted? |

`signed` |
Logical, should the analyzed network be signed? |

`directed` |
Logical, is the analyzed network directed? Usually does not have to be set and is detected automatically. |

`...` |
Additional arguments used in the estimator function. |

A `bootnet`

object with the following elements:

`sampleTable` |
A data frame containing all estimated values on the real sample. |

`bootTable` |
A data frame containing all estimated values on all bootstrapped samples. |

`sample` |
A |

`boots` |
A list of |

Sacha Epskamp <mail@sachaepskamp.com>

Epskamp, S., Borsboom, D., & Fried, E. I. (2016). Estimating psychological networks and their accuracy: a tutorial paper. arXiv preprint, arXiv:1604.08462.

`estimateNetwork`

, `differenceTest`

, `corStability`

, `plot.bootnet`

, `summary.bootnet`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ```
# BFI Extraversion data from psych package:
library("psych")
data(bfi)
bfiSub <- bfi[,1:25]
# Estimate network:
Network <- estimateNetwork(bfiSub, default = "EBICglasso")
# Centrality indices:
library("qgraph")
centralityPlot(Network)
## Not run:
# Estimated network:
plot(Network, layout = 'spring')
### Non-parametric bootstrap ###
# Bootstrap 1000 values, using 8 cores:
Results1 <- bootnet(Network, nBoots = 1000, nCores = 8)
# Plot bootstrapped edge CIs:
plot(Results1, labels = FALSE, order = "sample")
# Plot significant differences (alpha = 0.05) of edges:
plot(Results1, "edge", plot = "difference",onlyNonZero = TRUE,
order = "sample")
# Plot significant differences (alpha = 0.05) of node strength:
plot(Results1, "strength", plot = "difference")
# Test for difference in strength between node "A1" and "C2":
differenceTest(Results, "A1", "C2", "strength")
### Case-drop bootstrap ###
# Bootstrap 1000 values, using 8 cores:
Results2 <- bootnet(Network, nBoots = 1000, nCores = 8,
type = "case")
# Plot centrality stability:
plot(Results2)
# Compute CS-coefficients:
corStability(Results2)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.