The Poisson lognormal model and variants can be used for a variety of multivariate problems when count data are at play (including PCA for count data and network inference). This package implements an efficient algorithm to fit such models accompanied with a set of functions for vizualisation and diagnostic.
Installation requires a system version of nlopt 2.4-2
- On Debian or Ubuntu use
libnlopt-dev
:
sudo apt-get install libnlopt-dev
- On Fedora or similar use
NLopt-devel
:
sudo yum install NLopt-devel
- With Mac OS X, install
nlopt
via homebrew
brew install nlopt
- On Windows, the package now builds and installs correctly, by including static libraries on compilation. However, I just test it with appveyor so I have never run PLNmodels on Windows: any feedbacks welcomed!
## w/o vignettes
devtools::install_github("jchiquet/PLNmodels")
devtools::install_github("jchiquet/PLNmodels", build_vignettes = TRUE)
The package comes with a ecological data to present the functionality
library(PLNmodels)
data(trichoptera)
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.
myPLN <- PLN(Abundance ~ 1, data = trichoptera)
myPCA <- PLNPCA(Abundance ~ 1, data = trichoptera, ranks = 1:8)
myLDA <- PLNLDA(Abundance ~ 1, grouping = trichoptera$Group, data = trichoptera)
myPLNnetwork <- PLNnetwork(Abundance ~ 1, data = trichoptera)
Please cite our work using the following references: