
An R6 Class to represent a PLNfit in a sparse inverse covariance framework
Source:R/PLNnetworkfit-class.R
PLNnetworkfit.RdThe function PLNnetwork() produces a collection of models which are instances of object with class PLNnetworkfit.
This class comes with a set of methods, some of them being useful for the user:
See the documentation for plot() and methods inherited from PLNfit.
See also
The function PLNnetwork(), the class PLNnetworkfamily
Super classes
PLNfit -> PLNfit_fixedcov -> PLNnetworkfit
Active bindings
vcov_modelcharacter: the model used for the residual covariance
penaltythe global level of sparsity in the current model
penalty_weightsa matrix of weights controlling the amount of penalty element-wise.
n_edgesnumber of edges if the network (non null coefficient of the sparse precision matrix)
nb_paramnumber of parameters in the current PLN model
pen_loglikvariational lower bound of the l1-penalized loglikelihood
EBICvariational lower bound of the EBIC
densityproportion of non-null edges in the network
criteriaa vector with loglik, penalized loglik, BIC, EBIC, ICL, R_squared, number of parameters, number of edges and graph density
Methods
PLNnetworkfit$latent_network()
Extract interaction network in the latent space
Usage
PLNnetworkfit$latent_network(type = c("partial_cor", "support", "precision"))PLNnetworkfit$plot_network()
plot the latent network.
Arguments
typeedge value in the network. Either "precision" (coefficient of the precision matrix) or "partial_cor" (partial correlation between species).
outputOutput type. Either
igraph(for the network) orcorrplot(for the adjacency matrix)edge.colorLength 2 color vector. Color for positive/negative edges. Default is
c("#F8766D", "#00BFC4"). Only relevant for igraph output.remove.isolatedif
TRUE, isolated node are remove before plotting. Only relevant for igraph output.node.labelsvector of character. The labels of the nodes. The default will use the column names ot the response matrix.
layoutan optional igraph layout. Only relevant for igraph output.
plotlogical. Should the final network be displayed or only sent back to the user. Default is
TRUE.
Examples
if (FALSE) { # \dontrun{
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
nets <- PLNnetwork(Abundance ~ 1, data = trichoptera)
myPLNnet <- getBestModel(nets)
class(myPLNnet)
print(myPLNnet)
} # }