plot.snowboot {snowboot} | R Documentation |
Plot Degree Distribution Estimates
Description
Plot LSMI-based point estimates of probabilities of node degrees, \hat{f}(k)
, and
of mean degree, \hat{\mu}
, where k = 0, 1, \ldots
are the degrees.
The point estimates are supplemented with box-and-whisker plots
of bootstrapped values (if the input is a boot_dd
output) or element-wise
bootstrap confidence intervals (if the input is a boot_ci
output).
See Chen et al. (2018).
Usage
## S3 method for class 'snowboot'
plot(
x,
k = NULL,
plotmu = TRUE,
plotlegend = TRUE,
col0 = "gray50",
lwd0 = 1,
colpt = "royalblue3",
lwdpt = 2,
pchpt = 4,
coli = "palegreen3",
colibg = "palegreen",
length = 0.1,
boxwex = 0.4,
legendargs = list(x = "topright", cex = 0.9, bty = "n"),
las = 1,
...
)
Arguments
x |
|
k |
an integer vector with degrees to plot.
By default, all degrees represented in |
plotmu |
logical value indicating whether to plot the results for mean degree
(default is |
plotlegend |
logical value indicating whether to plot a legend
(default is |
col0 |
color to plot horizontal zero-line at |
lwd0 |
width of the horizontal zero-line at |
colpt |
color for plotting point estimates. |
lwdpt |
line width for plotting point estimates. |
pchpt |
point type for plotting point estimates
(see argument |
coli |
color for plotting lines or borders of box-plots for bootstrap estimates. |
colibg |
background color, if plotting boxplots of bootstrapped estimates
(see argument |
length |
length of arrows, if plotting bootstrap confidence intervals
(see argument |
boxwex |
argument of |
legendargs |
additional arguments for plotting the legend
(see arguments in |
las |
argument of |
... |
additional arguments to pass to the |
References
Chen Y, Gel YR, Lyubchich V, Nezafati K (2018). “Snowboot: bootstrap methods for network inference.” The R Journal, 10(2), 95–113. doi: 10.32614/RJ-2018-056.
Examples
net <- artificial_networks[[1]]
x <- lsmi_dd(net = net, n.wave = 2, n.seed = 40)
plot(x)
x2 <- boot_dd(x)
plot(x2, k = c(1:10))
x3 <- boot_ci(x2, prob = 0.99)
plot(x3, k = c(1:10))