Learn R Programming

snowboot (version 0.5.2)

sample_about_one_seed: Snowball Sampling with Multiple Inclusion Around a Single Seed

Description

This function performs snowball sampling with multiple inclusions (LSMI) around a single seed.

Usage

sample_about_one_seed(net, seed0, n.neigh = 1)

Arguments

net

A network object that is list containing:

edges

The edgelist of the network. A two column matrix where each row is an edge.

degree

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

n

The network order.

The object can be created by local.network.MR.new5 or it can be imported.

seed0

num. Id of a seed to be sampled around.

n.neigh

A number of waves to be sampled around each seed in LSMI. For example, n.neigh = 0 corresponds to seeds only, and n.neigh = 1 corresponds to sampling seeds and their first neighbors). Note that the algorithm allows for multiple inclusions.

Value

a list containing:

seed

seed0 num. Id of a seed to be sampled around.

sampleN

A vector of numeric ids of the nodes from LSMI along with the original seed. This vector may have duplicates, since the algorithm allows for multiple inclusions.

unode

A vector containing the unique values in $sampleN.

nodes.waves

A list of length n.neigh containing vectors where each vector reports numeric ids of nodes sampled in a particular wave.

References

Thompson, M. E., Ramirez Ramirez, L. L., Lyubchich, V. and Gel, Y. R. (2015), Using the bootstrap for statistical inference on random graphs. Can J Statistics. doi: 10.1002/cjs.11271

Examples

Run this code
# NOT RUN {
net <- artificial_networks[[1]]
a <- sample_about_one_seed(net = net, seed0 = 1, n.neigh = 2)
# }

Run the code above in your browser using DataLab