Learn R Programming

snowboot (version 0.5.0)

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: [object Object],[object Object],[object Object] 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:
  • seedseed0 num. Id of a seed to be sampled around.
  • sampleNA 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.
  • unodeA vector containing the unique values in $sampleN.
  • nodes.wavesA 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
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