Learn R Programming

PLNmodels (version 0.9.5)

PLNnetworkfamily: An R6 Class to represent a collection of PLNnetworkfit

Description

The function PLNnetwork produces an instance of this class.

This class comes with a set of methods, some of them being useful for the user: See the documentation for getBestModel, getModel and plot.

Arguments

Super class

PLNmodels::PLNfamily -> PLNnetworkfamily

Public fields

responses

the matrix of responses common to every models

covariates

the matrix of covariates common to every models

offsets

the matrix of offsets common to every models

weights

the vector of observation weights

models

a list of PLNnetworkfit object, one per penalty.

inception

a PLNfit object, obtained when no sparsifying penalty is applied.

Active bindings

responses

the matrix of responses common to every models

covariates

the matrix of covariates common to every models

offsets

the matrix of offsets common to every models

weights

the vector of observation weights

penalties

the sparsity level of the network in the successively fitted models

models

a list of PLNnetworkfit object, one per penalty.

inception

a PLNfit object, obtained when no sparsifying penalty is applied.

criteria

a data frame with the values of some criteria (variational lower bound J, BIC, ICL and R2) for the different models.

Methods

Public methods

Method new()

Usage

PLNnetworkfamily$new(
  penalties,
  responses,
  covariates,
  offsets,
  weights,
  model,
  control
)

Method optimize()

Usage

PLNnetworkfamily$optimize(control)

Method stability_selection()

Usage

PLNnetworkfamily$stability_selection(
  subsamples = NULL,
  control = list(),
  mc.cores = 1
)

Method coefficient_path()

Usage

PLNnetworkfamily$coefficient_path(precision = TRUE, corr = TRUE)

Method getBestModel()

Usage

PLNnetworkfamily$getBestModel(
  crit = c("BIC", "loglik", "R_squared", "EBIC", "StARS"),
  stability = 0.9
)

Method plot()

Usage

PLNnetworkfamily$plot(
  criteria = c("loglik", "pen_loglik", "BIC", "EBIC"),
  log.x = TRUE,
  annotate
)

Method plot_stars()

Usage

PLNnetworkfamily$plot_stars(stability = 0.9, log.x = TRUE)

Method plot_objective()

Usage

PLNnetworkfamily$plot_objective()

Method show()

Usage

PLNnetworkfamily$show()

Method clone()

The objects of this class are cloneable with this method.

Usage

PLNnetworkfamily$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

The function PLNnetwork, the class PLNnetworkfit

Examples

Run this code
# NOT RUN {
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
fits <- PLNnetwork(Abundance ~ 1, data = trichoptera)
class(fits)
# }

Run the code above in your browser using DataLab