Package: PLNmodels 1.3.0

Julien Chiquet

PLNmodels: Poisson Lognormal Models

The Poisson-lognormal model and variants (Chiquet, Mariadassou and Robin, 2021 <doi:10.3389/fevo.2021.588292>) can be used for a variety of multivariate problems when count data are at play, including principal component analysis for count data, discriminant analysis, model-based clustering and network inference. Implements variational algorithms to fit such models accompanied with a set of functions for visualization and diagnostic.

Authors:Julien Chiquet [aut, cre], Mahendra Mariadassou [aut], Stéphane Robin [aut], François Gindraud [aut], Julie Aubert [ctb], Bastien Batardière [ctb], Giovanni Poggiato [ctb], Cole Trapnell [ctb], Maddy Duran [ctb]

PLNmodels_1.3.0.tar.gz
PLNmodels_1.3.0.zip(r-4.7)PLNmodels_1.3.0.zip(r-4.6)PLNmodels_1.3.0.zip(r-4.5)
PLNmodels_1.3.0.tgz(r-4.6-x86_64)PLNmodels_1.3.0.tgz(r-4.6-arm64)PLNmodels_1.3.0.tgz(r-4.5-x86_64)PLNmodels_1.3.0.tgz(r-4.5-arm64)
PLNmodels_1.3.0.tar.gz(r-4.7-arm64)PLNmodels_1.3.0.tar.gz(r-4.7-x86_64)PLNmodels_1.3.0.tar.gz(r-4.6-arm64)PLNmodels_1.3.0.tar.gz(r-4.6-x86_64)
PLNmodels_1.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
PLNmodels/json (API)

# Install 'PLNmodels' in R:
install.packages('PLNmodels', repos = c('https://pln-team.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pln-team/plnmodels/issues

Pkgdown/docs site:https://pln-team.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

count-datamultivariate-analysisnetwork-inferencepcapoisson-lognormal-modelopenblascppopenmp

9.81 score 59 stars 343 scripts 543 downloads 28 exports 50 dependencies

Last updated from:bd801b7e03. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK368
linux-devel-x86_64OK880
source / vignettesOK757
linux-release-arm64OK384
linux-release-x86_64OK825
macos-release-arm64OK279
macos-release-x86_64OK521
macos-oldrel-arm64OK185
macos-oldrel-x86_64OK528
windows-develOK480
windows-releaseOK504
windows-oldrelOK493
wasm-releaseOK244

Exports:%>%coefficient_pathcompute_offsetcompute_PLN_starting_pointcompute_ZIPLN_starting_pointextract_probsgetBestModelgetModelICLPLNPLN_paramPLNLDAPLNLDA_paramPLNmixturePLNmixture_paramPLNnetworkPLNnetwork_paramPLNPCAPLNPCA_parampredict_condprepare_datarPLNstability_selectionstandard_errorZIPLNZIPLN_paramZIPLNnetworkZIPLNnetwork_param

Dependencies:bitbit64callrclicorocorrplotcpp11descdplyrfarvergenericsggplot2glassoFastgluegridExtragtableigraphisobandjsonlitelabelinglatticelifecyclemagrittrMASSMatrixnloptrotelpillarpkgconfigprocessxpspurrrR6RColorBrewerRcppRcppArmadillorlangS7safetensorsscalesstringistringrtibbletidyrtidyselecttorchutf8vctrsviridisLitewithr

Analyzing multivariate count data with the Poisson log-normal model
Preliminaries | Requirements | Data set | Mathematical background | Covariates and offsets | Optimization by Variational inference | Analysis of trichoptera data with a PLN model | A PLN model with latent main effects | Adjusting a fit | The PLNfit object | Field access | GLM-like interface | Observation weights | Accounting for covariates and offsets | Covariance models (full, diagonal, spherical) | References

Last update: 2026-07-03
Started: 2019-03-24

Clustering of multivariate count data with PLN-mixture
Preliminaries | Requirements | Data set | Mathematical background | Covariates and offsets | Parametrization of the covariance of the mixture models | Optimization by Variational inference | Analysis of trichoptera data with a PLN-mixture model | A mixture model with a latent main effects for the Trichoptera data set | Adjusting a collection of fits | Structure of PLNmixturefamily | Model selection | Structure of PLNmixturefit | Specific fields | plot method | predict method | References

Last update: 2026-07-03
Started: 2020-07-01

Description of the Trichoptera data set
Preliminaries | The trichoptera data set | Formatting | Table of counts (abundancies) | Covariates (external meteorological effect, groups) | Offsets and the compositionality issue | References

Last update: 2026-07-03
Started: 2019-03-24

Dimension reduction of multivariate count data with PLN-PCA
Preliminaries | Requirements | Data set | Mathematical background | Covariates and offsets | Optimization by Variational inference | Analysis of trichoptera data with a PLNPCA model | A model with latent main effects for the Trichoptera data set | Adjusting a collection of fits | Structure of PLNPCAfamily | Model selection of rank $q$ | Structure of PLNPCAfit | Additional visualization | Projecting new data in the PCA space | A model accounting for meteorological covariates | References

Last update: 2026-07-03
Started: 2019-03-24

Data importation in PLNmodels
Preliminaries | Format description | Computing offsets | Building data frame using prepare_data | Importing data from biom and phyloseq objects using prepare_data_from_[phyloseq|biom] | Reading from a biom file | Reading from a phyloseq-class object | Mathematical details about the offsets | Total Sum Scaling | Cumulative Sum Scaling | Relative Log Expression | Geometric Mean of Pairwise Ratio | Wrench normalisation | References

Last update: 2026-07-03
Started: 2019-03-24

Sparse structure estimation for multivariate count data with PLN-network
Preliminaries | Requirements | Data set | Mathematical background | Covariates and offsets | Alternating optimization | Analysis of trichoptera data with a PLNnetwork model | Adjusting a collection of network - a.k.a. a regularization path | Structure of PLNnetworkfamily | Exploring the path of networks | Model selection issue: choosing a network | Structure of a PLNnetworkfit | References

Last update: 2026-07-03
Started: 2019-03-24

Supervized classification of multivariate count table with the Poisson discriminant Analysis
Preliminaries | Requirements | Data set | Mathematical background | Covariates and offsets | Prediction | Optimization by Variational inference | Analysis of trichoptera data with a PLN-LDA model | A model with main effects and no covariates | Structure of PLNLDAfit | Specific fields | plot method | predict method | A model with latent main effects and meteorological covariates | References

Last update: 2026-07-03
Started: 2019-03-24

Zero-inflated PLN models for multivariate count data with excess zeros
Preliminaries | Requirements | Data set | Mathematical background | Analysis of microcosm with ZIPLN | Comparing zero-inflation parameterizations | Inspecting the fit | Sparse network inference with ZIPLNnetwork | References

Last update: 2026-07-03
Started: 2026-06-18

Readme and manuals

Help Manual

Help pageTopics
Akaike Information Criterion for a fitted PLN modelAIC.PLNfit
Akaike Information Criterion for a fitted ZIPLN modelAIC.ZIPLNfit
Barents fish data setbarents
Bayesian Information Criterion for a fitted PLN modelBIC.PLNfit
Bayesian Information Criterion for a fitted ZIPLN modelBIC.ZIPLNfit
Extract model coefficientscoef.PLNfit
Extracts model coefficients from objects returned by 'PLNLDA()'coef.PLNLDAfit
Extract model coefficientscoef.PLNmixturefit
Extract model coefficientscoef.ZIPLNfit
Extract the regularization path of a PLNnetwork fitcoefficient_path
Compute offsets from a count data using one of several normalization schemescompute_offset
Helper function for PLN initialization.compute_PLN_starting_point
Helper function for ZIPLN initialization.compute_ZIPLN_starting_point
Extract edge selection frequency in bootstrap subsamplesextract_probs
Extracts model fitted values from objects returned by 'PLN()' and its variantsfitted.PLNfit
Extracts model fitted values from objects returned by 'PLNmixture()' and its variantsfitted.PLNmixturefit
Extracts model fitted values from objects returned by 'ZIPLN()' and its variantsfitted.ZIPLNfit
Best model extraction from a collection of modelsgetBestModel getBestModel.Networkfamily getBestModel.PLNmixturefamily getBestModel.PLNnetworkfamily getBestModel.PLNPCAfamily getBestModel.ZIPLNnetworkfamily
Model extraction from a collection of modelsgetModel getModel.Networkfamily getModel.PLNmixturefamily getModel.PLNnetworkfamily getModel.PLNPCAfamily getModel.ZIPLNnetworkfamily
Integrated Classification LikelihoodICL ICL.PLNfit ICL.ZIPLNfit
Extract log-likelihood of a fitted PLN modellogLik.PLNfit
Extract log-likelihood of a fitted ZIPLN modellogLik.ZIPLNfit
Cow microbiome data setmicrocosm
Mollusk data setmollusk
An R6 Class to virtually represent a collection of network fitsNetworkfamily
Oaks amplicon data setoaks
Poisson lognormal modelPLN
Control of a PLN fitPLN_param
An R6 Class to represent a collection of PLNfitPLNfamily
An R6 Class to represent a PLNfit in a standard, general frameworkPLNfit
An R6 Class to represent a PLNfit in a standard, general framework, with diagonal residual covariancePLNfit_diagonal PLNLDAfit_spherical
An R6 Class to represent a PLNfit in a standard, general framework, with fixed (inverse) residual covariancePLNfit_fixedcov
An R6 Class to represent a PLNfit with a residual covariance structured by a fixed correlation matrix (e.g. a genetic relationship matrix), motivated by population geneticsPLNfit_genpop
An R6 Class to represent a PLNfit in a standard, general framework, with spherical residual covariancePLNfit_spherical
Poisson lognormal model towards Linear Discriminant AnalysisPLNLDA
Control of a PLNLDA fitPLNLDA_param
An R6 Class to represent a PLNfit in a LDA frameworkPLNLDAfit
An R6 Class to represent a PLNfit in a LDA framework with diagonal covariancePLNLDAfit_diagonal
Poisson lognormal mixture modelPLNmixture
Control of a PLNmixture fitPLNmixture_param
An R6 Class to represent a collection of PLNmixturefitPLNmixturefamily
An R6 Class to represent a PLNfit in a mixture frameworkPLNmixturefit
Sparse Poisson lognormal model for network inferencePLNnetwork
Control of PLNnetwork fitPLNnetwork_param
An R6 Class to represent a collection of 'PLNnetworkfit'sPLNnetworkfamily
An R6 Class to represent a PLNfit in a sparse inverse covariance frameworkPLNnetworkfit
Poisson lognormal model towards Principal Component AnalysisPLNPCA
Control of PLNPCA fitPLNPCA_param
An R6 Class to represent a collection of PLNPCAfitPLNPCAfamily
An R6 Class to represent a PLNfit in a PCA frameworkPLNPCAfit
Display various outputs (goodness-of-fit criteria, robustness, diagnostic) associated with a collection of network fits (either 'PLNnetworkfamily' or 'ZIPLNnetworkfamily')plot.Networkfamily plot.PLNnetworkfamily plot.ZIPLNnetworkfamily
Display the criteria associated with a collection of PLN fits (a PLNfamily)plot.PLNfamily
LDA visualization (individual and/or variable factor map(s)) for a 'PLNPCAfit' objectplot.PLNLDAfit
Display the criteria associated with a collection of PLNmixture fits (a PLNmixturefamily)plot.PLNmixturefamily
Mixture visualization of a 'PLNmixturefit' objectplot.PLNmixturefit
Extract and plot the network (partial correlation, support or inverse covariance) from a 'PLNnetworkfit' objectplot.PLNnetworkfit
Display the criteria associated with a collection of PLNPCA fits (a PLNPCAfamily)plot.PLNPCAfamily
PCA visualization (individual and/or variable factor map(s)) for a 'PLNPCAfit' objectplot.PLNPCAfit
Extract and plot the network (partial correlation, support or inverse covariance) from a 'ZIPLNfit_sparse' objectplot.ZIPLNfit_sparse
Predict counts conditionallypredict_cond predict_cond.PLNfit
Predict counts of a new samplepredict.PLNfit
Predict group of new samplespredict.PLNLDAfit
Prediction for a 'PLNmixturefit' objectpredict.PLNmixturefit
Predict counts of a new samplepredict.ZIPLNfit
Prepare data for use in PLN modelsprepare_data
PLN RNGrPLN
Single cell RNA-seq datascRNA
Extract variance-covariance of residuals 'Sigma'sigma.PLNfit
Extract variance-covariance of residuals 'Sigma'sigma.PLNmixturefit
Extract variance-covariance of residuals 'Sigma'sigma.ZIPLNfit
Compute the stability path by stability selectionstability_selection
Component-wise standard errors of Bstandard_error standard_error.PLNfit standard_error.PLNfit_fixedcov standard_error.PLNmixturefit standard_error.PLNnetworkfit standard_error.PLNPCAfit
Trichoptera data settrichoptera
Calculate Variance-Covariance Matrix for a fitted 'PLN()' model objectvcov.PLNfit
Zero Inflated Poisson lognormal modelZIPLN
Control of a ZIPLN fitZIPLN_param
An R6 Class to represent a ZIPLNfitZIPLNfit
An R6 Class to represent a ZIPLNfit in a standard, general framework, with diagonal residual covarianceZIPLNfit_diagonal
An R6 Class to represent a ZIPLNfit in a standard, general framework, with fixed (inverse) residual covarianceZIPLNfit_fixed
An R6 Class to represent a ZIPLNfit in a standard, general framework, with sparse inverse residual covarianceZIPLNfit_sparse
An R6 Class to represent a ZIPLNfit in a standard, general framework, with spherical residual covarianceZIPLNfit_spherical
Zero Inflated Sparse Poisson lognormal model for network inferenceZIPLNnetwork
Control of ZIPLNnetwork fitZIPLNnetwork_param
An R6 Class to represent a collection of ZIPLNnetworkZIPLNnetworkfamily