Learn R Programming

snowboot (version 0.5.2)

Union_LSMI: Snowball sampling with multiple inclusion.

Description

The function will creat a list of LSMI objects. The function is primairly used in cross-validation.

Usage

Union_LSMI(net, n.seeds, n.neigh, seeds = NULL)

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 numeric vector of seeds for snowball sampling. It must be a positive integers.

n.neigh

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

Value

A list containing LSMI objects

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 <- Union_LSMI(net, n.seeds = c(5,10), n.neigh = 1:2)
# }

Run the code above in your browser using DataLab