Estimate the parameters of a LBM

get_lbm_param(A, model_size = NULL, ...)

Arguments

A

A matrix, the incident matrix of the network

model_size

A vector of size 2, the size of the model parameters. If NULL, the default, model will be chosen as the one with the highest ICL criterion among all fitted models during the inference.

...

Additional arguments pass to the inference function of package GREMLIN if there are missing value and blockmodels if none.

Value

A list of the LBM parameters. The list is set

Examples

# When the size of the model is unknown:
data("seeddispersal")
param <- get_lbm_param(seeddispersal, ncores = 1L)
#> 

#> 





































do.call(auc_robustness_lbm, param)
#> [1] 0.9207443

# For a fixed number of blocks (useful for comparison)
param <- get_lbm_param(seeddispersal, model_size = c(1, 3), ncores = 1L)
#> 

#> 







do.call(auc_robustness_lbm, param)
#> [1] 0.9182079

# For data with missing observations
# \donttest{
A <- seeddispersal
A[sample(seq_len(nrow(A)), 5),
  sample(seq_len(ncol(A)), 10)] <- NA
param <- get_lbm_param(A, nbCores = 1L)
#> [1] "initialisation based on each network is not relevant"
do.call(auc_robustness_lbm, param)# }
#> [1] 0.9226301