This function can be used to plot bootnet results by plotting all bootstrapped statistics as line or by plotting confidence intervals.
# S3 method for bootnet
plot(x, statistics, plot, graph, CIstyle = c(
"quantiles", "SE"), rank = FALSE, sampleColor =
"darkred", samplelwd = 1, meanColor = "black", meanlwd
= 0.5, bootColor = "black", bootAlpha = 0.01, bootlwd
= 0.9, areaAlpha = 0.1, order = c("id", "sample",
"mean"), decreasing = TRUE, perNode = FALSE,
legendNcol = 2, labels = TRUE, legend = TRUE,
subsetRange = c(100, 0), area = !perNode, alpha =
0.05, onlyNonZero = FALSE, differenceShowValue,
differenceEdgeColor = TRUE, verbose = TRUE, panels =
TRUE, split0 = FALSE, prop0 = ifelse(split0, TRUE,
FALSE), prop0_cex = 1, prop0_alpha = 0.8,
prop0_minAlpha = 0.25, subset, ...)
A ggplot2
object.
A bootnet
object
The types of statistics to plot.Defaults to "edge"
for regular bootstrap and c("strength", "outStrength", "inStrength")
for node and person drop bootstrap. Use "all"
to obtain all pairwise statistics tested for regular bootstraps and all nodewise statistics tested for person and node drop bootstarps.
Character string indicating what to plot. Can be "area"
to produce a graph with the area indicating the confidence region, or "difference"
producing a plot showing significant differences. Other options are "line"
and "interval"
, which are currently unstable and not recommended to use.
If multipe graphs are estimated, which graph should be plotted? Currently used for default = "graphicalVAR"
to plot a temporal network using graph = "temporal"
or a contemporaneous network using graph = "contemporaneous"
Style of CIs to construct. "SE"
shows the sample statistic plus and minus two times the standard deviation of bootstraps, and "quantiles"
the area between the 2.5th and 97.5th quantile. Defaults to "quantiles"
.
Logical, should plots show rank of statistics instead of statistics?
Color of the original sample line
Line width of the original sample line
Color of the bootstrap lines
Alpha of the bootstrap lines
Line width of the bootstrap lines
Alpha of the area
String indicating how to order nodes. "id"
will order nodes based on their name, "mean"
will order nodes based on the average bootstrapped value of the first statistic in statistics
, and "sample"
will order the nodes as done in "mean"
but orders ties based on their sample value.
Logical indicating if the ordering is decreasing or increasing.
Logical, should centrality estimates per node be plotted instead of correlation with original parameter. Only used in node and person drop bootstrap.
Number of columns in the legend if perNode = TRUE
.
Logical, should labels be plotted?
Logical, should the legend be plotted?
Range in percentages of the x-axis in node and person drop plots.
Logical, should the confidence area be plotted?
Signifiance level used in plot = "difference"
.
Logical used when plot = "difference", statistics = "edge"
, should only edges be included that were nonzero in the estimated network structure?
Logical used when plot = "difference"
. Should values be shown in the diagonal of the difference plot?
Logical used when plot = "difference", statistics = "edge"
. Should diagonal blocks be colored according to default edge colors?
Should expected alpha be printed?
Logical, should panel titles be printed?
Color of the bootstrap means.
Line width of the bootstrap means
Logical. When set to TRUE, the displayed intervals are based on occasions when the parameter was not estimated to be zero, and an extra box is added indicating the number of times a parameter is estimated to be zero.
Logical, should boxes indicating the proportion of times parameters were estimated to be zero be added to the plot?
Size of the boxes indicating number of times a parameter was set to zero.
Transparency of the boxes indicating number of times a parameter was set to zero.
Minimal transparency of the *lines* of plotted intervals as the proportion of times an edge was not included goes to 0.
Vector indicating labels of nodes to include in the plot. This can be used to show, for example, only edges related to one particular node.
Not used.
Sacha Epskamp <mail@sachaepskamp.com>