Aggregate boostrap replicates of spacemap into a final Boot.Vote model.

bootVote(bfits, thresh = 0.5, givenX = FALSE)

Arguments

bfits

List of fitted spacemap models returned from bootEnsemble.

thresh

Positive numeric threshold for the minimum proportion of bootstrap replicate model fits with a particular edge such that the edge is included in the Boot.Vote model.

givenX

Logical. Defaults to FALSE. Should be set to TRUE when attr(bfits, "method) == "space and space was used to infer (x--x, x--y, y--y) edges but only reported (x--y, y--y) edges.

Value

Returns a list of lists. First list is bv, which encodes the edges in two logical adjacency matrices.

  1. yy Adjacency matrix where 1 for the (q,l) off-diagonals element indicate an edge between the qth and lth response variables, and 0 otherwise.

  2. xy Adjacency matrix where 1 for the (p,q) element indicate an edge between the pth predictor and qth response variable, and 0 otherwise.

Second list is bdeg, which contains the degree distribution for each bootstrap replicate fit.

  1. yy Integer matrix (\(B \times Q\) where the (q,b) off-diagonals element indicates the out-degree of the qth response variable for the bth converged model based on the bth bootstrap replicate.

  2. xy Integer matrix (\(B \times P\) where the (p,b) element indicates the out-degree of the pth predictor variable for the bth converged model based on the bth bootstrap replicate.

Third list is bc, which stores several additional statistics on the ensemble network fits.

  1. yy Integer matrix containing the y--y edge selection frequency out of B replicates.

  2. xy Integer matrix containing the x--y edge selection frequency out of B replicates.

  3. dfyy Integer vector containing the total number of y--y edges for each fit.

  4. dfxy Integer vector containing the total number of x--y edges for each fit.

Note: If method == "space" & givenX == FALSE, then no xy, dfxy elements will be reported in the above lists.

See also

bootEnsemble

Examples

#Load simulation library(spacemap) data(sim1) #Boostrap Ensemble (B = 10) for illustration only tune <- data.frame(lam1 = 70, lam2 = 28, lam3 = 17.5) #suppress warnings because parallel backend not set up. ens <- suppressWarnings(bootEnsemble(Y = sim1$Y, X = sim1$X, tune = tune, method = "spacemap", B = 10)) bv <- suppressWarnings(bootVote(ens))