| PLNfamily {PLNmodels} | R Documentation |
An R6 Class to represent a collection of PLNfit
Description
super class for PLNPCAfamily and PLNnetworkfamily.
Public fields
responsesthe matrix of responses common to every models
covariatesthe matrix of covariates common to every models
offsetsthe matrix of offsets common to every models
weightsthe vector of observation weights
inceptiona PLNfit object, obtained when no sparsifying penalty is applied.
modelsa list of PLNfit object, one per penalty.
Active bindings
criteriaa data frame with the values of some criteria (approximated log-likelihood, BIC, ICL, etc.) for the collection of models / fits BIC and ICL are defined so that they are on the same scale as the model log-likelihood, i.e. with the form, loglik - 0.5 penalty
convergencesends back a data frame with some convergence diagnostics associated with the optimization process (method, optimal value, etc)
Methods
Public methods
Method new()
Create a new PLNfamily object.
Usage
PLNfamily$new(responses, covariates, offsets, weights, control)
Arguments
responsesthe matrix of responses common to every models
covariatesthe matrix of covariates common to every models
offsetsthe matrix of offsets common to every models
weightsthe vector of observation weights
controllist controlling the optimization and the model
Returns
A new PLNfamily object
Method postTreatment()
Update fields after optimization
Usage
PLNfamily$postTreatment(config_post, config_optim)
Arguments
config_posta list for controlling the post-treatments (optional bootstrap, jackknife, R2, etc.).
config_optima list for controlling the optimization parameters used during post_treatments
Method getModel()
Extract a model from a collection of models
Usage
PLNfamily$getModel(var, index = NULL)
Arguments
varvalue of the parameter (
rankfor PLNPCA,sparsityfor PLNnetwork) that identifies the model to be extracted from the collection. If no exact match is found, the model with closest parameter value is returned with a warning.indexInteger index of the model to be returned. Only the first value is taken into account.
Returns
A PLNfit object
Method plot()
Lineplot of selected criteria for all models in the collection
Usage
PLNfamily$plot(criteria, reverse)
Arguments
criteriaA valid model selection criteria for the collection of models. Includes loglik, BIC (all), ICL (PLNPCA) and pen_loglik, EBIC (PLNnetwork)
reverseA logical indicating whether to plot the value of the criteria in the "natural" direction (loglik - penalty) or in the "reverse" direction (-2 loglik + penalty). Default to FALSE, i.e use the natural direction, on the same scale as the log-likelihood.
Returns
A ggplot2 object
Method show()
User friendly print method
Usage
PLNfamily$show()
Method print()
User friendly print method
Usage
PLNfamily$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
PLNfamily$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.