The function's inputs are a network, a vector of possible seed sample-sizes, a vector of possible waves, and a few tuning parameters. The output will contain the best seed-wave combination for each degree and the width of the 95 percent bootstrap confidence intervals at each degree for the best seed-wave combination.
cross_validation_mean(network, n.seeds, n.neigh, n.boot, method = "w",
alpha = 0.05, proxyRep = 19, proxyOrder = 30)
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 numeric vector for the different sample sizes of seed to use in cross-validation.
A numeric vector for the different waves to use in cross-validation.
The number of bootstrap sample.
Can be either "w" for weighted bootstrap or "nw" for non-weighted bootstrap. "w" is recommended and set as the default method.
Desided type I error for bootstrap confidence intervals, which are obtained using the quantile method.
The number of time to sample a proxy. Default is 19.
The size of the proxy sample. Default is 30.
A list consisting of
A matrices that provides the best seed-wave combinations (obtained via cross-validation) for the respective estimation method.
A vector of length 2 that provides the bootstrap confidence intervals for the estimated mean degree using the best seed-wave combinations (see above).
Efron, B. (1979). Bootstrap methods: another look at the jackknife. The annals of Statistics, 1-26.
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 <- cross_validation_mean(network = net, n.seeds = c(10, 20, 30), n.neigh = c(1, 2),
n.boot = 200, method = "w")
# }
Run the code above in your browser using DataLab