Learn R Programming

snowboot (version 0.5.2)

LSMI: Snowball sampling with multiple inclusion.

Description

The function will conduct snowball sampling.

Usage

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

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.

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 feature is only supported when parameter n.neigh is greater than zero.

classic

Option for neighborhoods, i.e. waves, without multiple inclusions.

Value

A list containing the following elements:

seeds

A numeric a vector containing the numeric ids of sampled seeds.

sampleN

A 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.

unodes

A 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.waves

A 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
# NOT RUN {
net <- artificial_networks[[1]]
a <- LSMI(net, n.seeds = 20, n.neigh = 2)
# }

Run the code above in your browser using DataLab