The function will conduct snowball sampling.
LSMI(net, n.seeds = 10, n.neigh = 1, seeds = NULL, classic = F)A network object that is list containing:
The edgelist of the network. A two column
matrix where each row is an edge.
The degree sequence of the network, which is
an integer vector of length n.
The network order.
The object can be created by local.network.MR.new5 or
it can be imported.
A number of seeds in the snowball sample. It must be a positive integer.
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.
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.
Option for neighborhoods, i.e. waves, without multiple inclusions.
A list containing the following elements:
A numeric a vector containing the numeric ids of
sampled seeds.
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.
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).
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.
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
# NOT RUN {
net <- artificial_networks[[1]]
a <- LSMI(net, n.seeds = 20, n.neigh = 2)
# }
Run the code above in your browser using DataLab