R6 class for normal-block model with unknown Q (number of groups)
Source:R/NB_unknown_Q_collection_class.R
NB_unknown_Q.Rd
R6 class for normal-block model with unknown Q (number of groups)
R6 class for normal-block model with unknown Q (number of groups)
Public fields
models
list of NB_fixed_Q models corresponding to each nb_block value
control
store the list of user-defined model settings and optimization parameters
Active bindings
Q_list
number of blocks
criteria
a data frame with the values of some criteria ((approximated) log-likelihood, BIC, ICL) for the collection of models
who_am_I
a method to print what model is being fitted
Methods
Method new()
Create a new [`NB_unknown_Q`] object.
Usage
NB_unknown_Q$new(
mydata,
Q_list,
zero_inflation = FALSE,
sparsity = 0,
control = NB_control()
)
Arguments
mydata
object of NBData class, with responses and design matrix
Q_list
list of Q values (number of groups) in the collection
zero_inflation
whether the models in the collection should be zero-inflated or not
sparsity
sparsity penalty on the network density
control
structured list of more specific parameters, to generate with NB_control
Method optimize()
optimizes an NB_fixed_Q object for each value of Q
Usage
NB_unknown_Q$optimize(
control = list(niter = 100, threshold = 1e-04, verbose = TRUE)
)
Method get_model()
returns the NB_fixed_Q model corresponding to given Q
Method get_best_model()
Extract best model in the collection
Usage
NB_unknown_Q$get_best_model(crit = c("ICL", "BIC"))
Method plot()
Display various outputs (goodness-of-fit criteria, robustness, diagnostic) associated with a collection of network fits (a [`Networkfamily`])
Usage
NB_unknown_Q$plot(criteria = c("deviance", "ICL", "BIC", "EBIC"))