Skip to content
Snippets Groups Projects
README.md 1.91 KiB
Newer Older
Isabelle Sanchez's avatar
Isabelle Sanchez committed
# blockmodels4inventories

a Collection of R Functions to Analyze Inventories Data

Isabelle Sanchez's avatar
Isabelle Sanchez committed
http://nicolas.verzelen.pages.mia.inra.fr/blockmodels4inventories/

Isabelle Sanchez's avatar
Isabelle Sanchez committed
Using a latent block model by encapsulating the **blockmodels** library in the **blockmodels4inventories** library to perform biclustering on survey data to characterize the crop diversity and diversity of seeds supply modes..
Isabelle Sanchez's avatar
Isabelle Sanchez committed

possible input data: Presence/absence and count data

* on crop diversity
* on crop uses
* on sources of seed supply

as well as . . . many covariates

# Installation

To install the **blockmodels4inventories** package, the easiest is to install it directly from GitLab. Open an R session and run the following commands:

```R
Isabelle Sanchez's avatar
Isabelle Sanchez committed
if (!require("remotes")) {
  install.packages("remotes")
}
remotes::install_gitlab("nicolas.verzelen/blockmodels4inventories", 
Isabelle Sanchez's avatar
Isabelle Sanchez committed
                        host = "forgemia.inra.fr",
                        build_vignettes=TRUE)
Isabelle Sanchez's avatar
Isabelle Sanchez committed

Isabelle Sanchez's avatar
Isabelle Sanchez committed
```

# Usage

Once the package is installed on your computer, it can be loaded into a R session:

```R
library(blockmodels4inventories)
help(package="blockmodels4inventories")
```

Main specifications:

* LBM as a model-based bi-clustering method
* Easily handles covariates

Isabelle Sanchez's avatar
Isabelle Sanchez committed
![incid](man/figures/incidence2.PNG)
Isabelle Sanchez's avatar
Isabelle Sanchez committed
![biclust](man/figures/classic2.PNG)
Isabelle Sanchez's avatar
Isabelle Sanchez committed
![count](man/figures/count.PNG)
Isabelle Sanchez's avatar
Isabelle Sanchez committed

# Citation

As a lot of time and effort were spent in creating the **blockmodels4inventories** and **blockmodels**  methods, please cite it when using it for data analysis:
Isabelle Sanchez's avatar
Isabelle Sanchez committed

Jean-Benoist Leger (2016). Blockmodels: A R-package for estimating in Latent Block Model and Stochastic Block Model, with various probability functions, with or without covariates.  	arXiv:1602.07587

Jean-Benoist Leger (2015). Blockmodels : Latent and Stochastic Block Model
Estimation by a 'V-EM' Algorithm.

You should also cite the **blockmodels4inventories** package:

```R
citation("blockmodels4inventories")
```

See also citation() for citing R itself.