PLNmodels: Poisson lognormal models

R build
status Coverage
status CRAN_Status_Badge Lifecycle:

The Poisson lognormal model and variants can be used for a variety of multivariate problems when count data are at play (including PCA, LDA and network inference for count data). This package implements efficient algorithms to fit such models accompanied with a set of functions for visualization and diagnostic. See this deck of slides for a comprehensive introduction.


PLNmodels is available on CRAN. The development version is available on Github.

R Package installation

Installing PLNmodels


Usage and main fitting functions

The package comes with an ecological data set to present the functionality

trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)

The main fitting functions work with the usual R formula notations, with mutivariate responses on the left hand side. You probably want to start by one of them. Check the corresponding vignette and documentation page. There is a dedicated vignettes for each model in the package (See

Unpenalized Poisson lognormal model (aka PLN)

myPLN <- PLN(Abundance ~ 1, data = trichoptera)

Rank Constrained Poisson lognormal for Poisson Principal Component Analysis (aka PLNPCA)

myPCA <- PLNPCA(Abundance ~ 1, data = trichoptera, ranks = 1:8)

Poisson lognormal discriminant analysis (aka PLNLDA)

myLDA <- PLNLDA(Abundance ~ 1, grouping = Group, data = trichoptera)

Sparse Poisson lognormal model for sparse covariance inference for counts (aka PLNnetwork)

myPLNnetwork <- PLNnetwork(Abundance ~ 1, data = trichoptera)

Mixture of Poisson lognormal models for model-based clustering of counts (aka PLNmixture)

myPLNmixture <- PLNmixture(Abundance ~ 1, data = trichoptera)


Please cite our work using the following references:

PLN-team/PLNmodels documentation built on Sept. 1, 2023, 5:45 p.m.