Learn R Programming

snowboot (version 1.0.2)

boot_ci: Confidence Intervals from Bootstrapped Network Degree Distribution

Description

The function calculates bootstrap confidence intervals for the parameters of network degree distribution: probabilities of node degrees \(f(k)\) and mean degree \(\mu\), where \(k = 0, 1, \ldots\) are the degrees.

Usage

boot_ci(x, prob = 0.95, method = c("percentile", "basic"))

Arguments

x

a list with bootstrapped results -- output of boot_dd.

prob

confidence level for the intervals. Default is 0.95 (i.e., 95% confidence).

method

method for calculating the bootstrap intervals. Default is "percentile" (see Details).

Value

A list object of class "snowboot" with the following elements:

fk_ci

A matrix of dimensions \(2 \times\)length(x$fk), where the number of columns corresponds to the number of probabilities \(f(k)\) estimated from an LSMI sample. Each column of the matrix is a confidence interval for a corresponding \(f(k)\). I.e., the first row of the matrix gives the lower bounds, while the second row contains all upper bounds.

mu_ci

A numeric vector of length 2 with lower and upper confidence bounds for the network mean degree \(\mu\).

prob

Confidence level for the intervals.

method

Method that was used for calculating the bootstrap intervals.

fk

A vector with an estimate of the degree distribution, copied from the input x$fk.

mu

An estimate of the mean degree, copied from the input x$mu.

Details

Currently, the bootstrap intervals can be calculated with two alternative methods: "percentile" or "basic". The "percentile" intervals correspond to Efron's \(100\cdot\)prob% intervals @see @efron_1979, also Equation 5.18 by @davison_hinkley_1997 and Equation 3 by @gel_etal_2017, @chen_etal_2018_snowbootsnowboot: $$(\theta^*_{[B\alpha/2]}, \theta^*_{[B(1-\alpha/2)]}),$$ where \(\theta^*_{[B\alpha/2]}\) and \(\theta^*_{[B(1-\alpha/2)]}\) are empirical quantiles of the bootstrap distribution with B bootstrap replications for parameter \(\theta\) (\(\theta\) can be the \(f(k)\) or \(\mu\)), and \(\alpha = 1 -\) prob.

The "basic" method produces intervals @see Equation 5.6 by @davison_hinkley_1997snowboot: $$(2\hat{\theta} - \theta^*_{[B(1-\alpha/2)]}, 2\hat{\theta} - \theta^*_{[B\alpha/2]}),$$ where \(\hat{\theta}\) is the sample estimate of the parameter. Note that this method can lead to negative confidence bounds, especially when \(\hat{\theta}\) is close to 0.

References

See Also

boot_dd

Examples

Run this code
# NOT RUN {
net <- artificial_networks[[1]]
lsmiEstimate <- lsmi_dd(net = net, n.seed = 5, n.wave = 3)
bootEstimates <- boot_dd(lsmiEstimate, B = 10)
bootIntervals1 <- boot_ci(bootEstimates)

#Another version of the intervals:
bootIntervals2 <- boot_ci(bootEstimates, method = "basic")

# }

Run the code above in your browser using DataLab