Plots bootnet results

Share:

Description

This function can be used to plot bootnet results by plotting all bootstrapped statistics as line or by plotting confidence intervals.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'bootnet'
plot(x, statistics, 
        plot,  CIstyle = c("default","SE","quantiles"), 
        rank = FALSE, sampleColor = "darkred", samplelwd = 1, 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,...)

Arguments

x

A bootnet object

statistics

The types of statistics to plot. c("intercept", "strength", "closeness", "betweenness") plots all nodewise statistics whereas c("edge","distance") plots all pairwise statistics. Defaults to "edge" for regular bootstrap and c("strength", "closeness", "betweenness") for node and person drop bootstrap.

plot

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.

CIstyle

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 "SE" for strength and betweenness and "quantiles" otherwise

rank

Logical, should plots show rank of statistics instead of statistics?

sampleColor

Color of the original sample line

samplelwd

Line width of the original sample line

bootColor

Color of the bootstrap lines

bootAlpha

Alpha of the bootstrap lines

bootlwd

Line width of the bootstrap lines

areaAlpha

Alpha of the area

order

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.

decreasing

Logical indicating if the ordering is decreasing or increasing.

perNode

Logical, should centrality estimates per node be plotted instead of correlation with original parameter. Only used in node and person drop bootstrap.

legendNcol

Number of columns in the legend if perNode = TRUE.

labels

Logical, should labels be plotted?

legend

Logical, should the legend be plotted?

subsetRange

Range in percentages of the x-axis in node and person drop plots.

area

Logical, should the confidence area be plotted?

alpha

Signifiance level used in plot = "difference".

onlyNonZero

Logical used when plot = "difference", statistics = "edge", should only edges be included that were nonzero in the estimated network structure?

differenceShowValue

Logical used when plot = "difference". Should values be shown in the diagonal of the difference plot?

differenceEdgeColor

Logical used when plot = "difference", statistics = "edge". Should diagonal blocks be colored according to default edge colors?

verbose

Should expected alpha be printed?

...

Not used.

Value

A ggplot2 object.

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>