Implements Bayesian networks as discrete and Gaussian multivariate weather generators in R. A small tutorial with several examples is provided in the companion notebook.
This is a novel methodology in the multisite stochastic weather generation game, which we proposed and thoroughly analyzed in the article Multisite Weather Generators using Bayesian Networks: An illustrative case study for precipitation occurrence, published in Water Resources Research. It also has some experimental functionality not restricted to weather generators, like predictive networks for downscaling purposes.
This package relies on bnlearn, plus the packages gRain (for exact inference) and iGraph (for visualization).
The installation process is as follows.
Firstly, some dependencies of gRain are installed through Bioconductor. It can be installed with the following commands:
install.packages("BiocManager")
BiocManager::install(version = "3.10")
Afterwards, we install the dependencies of gRain
from Bioconductor and then gRain
itself from CRAN:
BiocManager::install(c("graph", "RBGL", "Rgraphviz"))
install.packages("gRain", dependencies = TRUE)
With gRain
installed, we can install the package BNWeatherGen
directly from Github using devtools
library, with the following command:
devtools::install_github("MNLR/BNWeatherGen")
Note that, if devtools
is not already installed, it can be installed from CRAN using the command install.packages("devtools")
.