Learn R Programming

snowboot (version 1.0.2)

lsmi: Labeled Snowball with Multiple Inclusions (LSMI)

Description

Obtain LSMI samples around several seeds, which can be selected randomly or pre-specified. See Figure 1 by gel_etal_2017;textualsnowboot or Figure 2 by chen_etal_2018_snowboot;textualsnowboot illustrating the algorithm of sampling around multiple seeds.

Usage

lsmi(net, n.seed = 10, n.wave = 1, 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.seed

an integer defining the number of nodes to randomly sample from the network to start an LSMI sample around each of them.

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.

Value

A list of length n.seed (or, if seeds are specified, of length length(unique(seeds))), where each element is a list of length n.wave + 1 representing an LSMI produced by sample_about_one_seed.

Details

If seeds specified, n.seed is not used.

References

See Also

sample_about_one_seed, lsmi_union

Examples

Run this code
# NOT RUN {
net <- artificial_networks[[1]]
a <- lsmi(net, n.seed = 20, n.wave = 2)

# }

Run the code above in your browser using DataLab