Learn R Programming

snowboot (version 0.5.0)

LSMI: Snowball sampling with multiple inclusion.

Description

The function will conduct snowball sampling.

Usage

LSMI(net, n.seeds = 10, n.neigh = 1, seeds = NULL)

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.
n.seeds
A number of seeds in the snowball sample. It must be a positive integer.
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.
seeds
A matrix of dimension num.sam x n.seeds containing the numeric ids of the seeds to initiate sampling. Each row of the matrix corresponds to one LSMI sample. Note that this is an optional parameter. WARNING: As of now, this

Value

  • A list containing the following elements:
  • seedsA numeric a vector containing the numeric ids of sampled seeds.
  • sampleNA numeric vector containing ids of the nodes from the snowball sampling and the intial seeds' ids. This vector may have duplicates, since the algorithm allows for multiple inclusions.
  • unodesA list of length n.seeds where each element is a numeric vector containing the seed's id and the unique ids of all nodes that were snowball sampled from that seed using sample_about_one_seed (one vector per seed).
  • nodes.wavesA list of length n.seeds where each element is a list of length n.neigh (Note: these lists are the output object $nodes.waves from sample_about_one_seed) that contains vectors of numeric id's of the nodes reached in each respective wave from the respective seed.

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 <- LSMI(net, n.seeds = 20, n.neigh = 2)

Run the code above in your browser using DataLab