install.packages("Rcpp")
install.packages("nlme")
install.packages("coda")
install.packages("https://ljanss.github.io/Rbayz/Rbayz_0.9.0.zip", repos=NULL, type="win.binary") # Windows
install.packages("https://ljanss.github.io/Rbayz/Rbayz_0.9.0.tgz", repos=NULL, type="mac.binary") # MacOSBayesian mixed models, shrinkage, sparse and interaction kernel regression
R/bayz overview and features
R/bayz provides Bayesian mixed models, shrinkage regression, kernel-based random effects, interaction kernels, and feature-set regression. The R package is called Rbayz, and its main modelling function is bayz().
R/bayz
- covers mixed models in a Bayesian framework with uncertainty estimates on coefficients and variance parameters, MCMC convergence diagnostics, HPD intervals and trace plots.
- allows to add kernels (relationship / similarity matrices) on random effects, and multiple kernels on interactions, fitted as reduced rank tensors.
- can learn sparse multi-dimensional kernels as tensor decompositions, smooth kernels, sparsify kernels, and borrow information across kernels.
- directly models large sets of multiple features with different shrinkage regression options, and can obtain significances for individual features as “p-values from random effects”.
- offers standard R methods for summary, extraction of estimates, plot, predict and contrasts.
- is computationally efficient and can be used on large datasets, with parallelization options for MCMC sampling.
R/bayz has been developed in agriculture and ecology for various modeling and prediction needs using genomics, multi-omics, phenomics, enviromics, time-series images and spectral data, multi-time multi-tissue transcriptomics data, and more. This includes basic applications such as genomic and genomic-by-enviromic prediction and multi-trait modeling using a Bayesian factor-analytic approach. The approach used in R/bayz is extendable to efficiently learn covariance structures in higher order interactions such as trait x time x environment, and may be useful in any domain where mixed models, (multiple) kernels and/or large sets of predictors are relevant.
R/bayz technical details
R/Bayz is implemented in C++ using Rcpp and uses MCMC-based inference in Bayesian models. Current version: 0.12 (March 2026).
Downloading and installing R/bayz
R/bayz us not yet released as a cran R package. It can be downloaded and installed with the options shown below.
1. Precompiled binary versions (Windows, Mac)
There are precompiled binary packages for Windows and MacOS, which can be installed using install.packages() or with devtools-tools. The MacOS precompiled version is built on Mac silicon architecture, the Windows version on Windows 11. If these precompiled versions do not work on your Windows or MacOS system, use option 2 below to install from github source.
Using install.packages() requires to use repos=NULL to circumvent use of cran, but which requires then to manually install dependencies:
Alternatively, if you have devtools installed, you can use devtools::install_url(), which automatically does install dependencies as well:
devtools::install_url("https://ljanss.github.io/Rbayz/Rbayz_0.9.0.zip", type="win.binary") # Windows
devtools::install_url("https://ljanss.github.io/Rbayz/Rbayz_0.9.0.tgz", type="mac.binary") # MacOS2. Install source from Github repository (all systems including linux)
This requires a development environment in R, which needs Rtools on Windows, or “command line tools” on MacOS, and the devtools package. On linux the development tools may often be pre-installed. The below commands run in the R terminal.
Installing devtools and package dependencies:
install.packages("devtools")
install.packages("Rcpp")
install.packages("nlme")
install.packages("coda")Download and install/compile Rbayz using:
library(devtools)
devtools::install_github("ljanss/Rbayz")Further help and documentation
Use the main tabs at the top of the page or navigate directly to: