lsmi_union {snowboot}R Documentation

Snowball Sampling with Multiple Inclusions around Several Subsets of Seeds

Description

Obtain one big LSMI – with max(n.seeds) seeds and n.wave waves around each – and subsample seeds to create smaller LSMIs (with less seeds and/or waves). The function is primarily used in cross-validation.

Usage

lsmi_union(net, n.seeds, n.wave, seeds = NULL)

Arguments

net

a network object that is a list containing:

degree

the degree sequence of the network, which is an integer vector of length n;

edges

the edgelist, which is a two-column matrix, where each row is an edge of the network;

n

the network order (i.e., number of nodes in the network).

The network object can be simulated by random_network, selected from the networks available in artificial_networks, converged from an igraph object with igraph_to_network, etc.

n.seeds

an integer vector of numbers of seeds for snowball sampling (cf. a single integer n.seed in lsmi). Only n.seeds <= n are retained. If seeds is specified, only values n.seeds < length(unique(seeds)) are retained and automatically supplemented by length(unique(seeds)).

n.wave

an integer defining the number of waves (order of the neighborhood) to be recorded around the seed in the LSMI. For example, n.wave = 1 corresponds to an LSMI with the seed and its first neighbors. Note that the algorithm allows for multiple inclusions.

seeds

a vector of numeric IDs of pre-specified seeds. If specified, LSMIs are constructed around each such seed.

Details

Note that the produced LSMIs are slightly different from those described by Gel et al. (2017). The current R implementation produces smaller LSMIs by subsetting the seeds, not by new sampling of seeds from the network and growing completely new LSMIs, as it was done by Gel et al. (2017). See the details in Figure 3 by Chen et al. (2018)

Value

A list with two elements:

lsmi_big

LSMI with max(n.seeds) seeds (see the argument definition above) and n.wave waves produced by the lsmi function.

sequence_seeds

A list of length equal to length(n.seeds); each element of the list is a random subset of the seeds' IDs, starting from the largest (a set of size max(n.seeds)) to the smallest (a set of size min(n.seeds)).

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.

Gel YR, Lyubchich V, Ramirez Ramirez LL (2017). “Bootstrap quantification of estimation uncertainties in network degree distributions.” Scientific Reports, 7, 5807. doi: 10.1038/s41598-017-05885-x.

See Also

sample_about_one_seed, lsmi, lsmi_cv

Examples

net <- artificial_networks[[1]]
a <- lsmi_union(net, n.seeds = c(5, 10, 15), n.wave = 2)


[Package snowboot version 1.0.2 Index]