Package: flexyBayes 0.19.0

Max Moldovan

flexyBayes: Bayesian Mixed Models with 'ASReml' Syntax via 'INLA' and 'brms'

Specify a wide class of linear and generalized linear mixed models using familiar 'ASReml' or 'brms'-style formula syntax, and estimate them via 'INLA' or 'brms' ('Stan'). Returns results in formats compatible with the standard R modelling ecosystem including 'summary()', 'emmeans' and 'marginaleffects'. The package supports a range of responses from the exponential family (and a few beyond this), along with a few random effects covariance/residual structures including genotype-by-environment variances, per-level residual variances, and known-covariance genomic and pedigree matrices among others.

Authors:Max Moldovan [aut, cre], Emi Tanaka [ctb], Francis K.C. Hui [ctb], Anabel Forte Deltell [ctb], Grains Research and Development Corporation [fnd, cph]

flexyBayes_0.19.0.tar.gz
flexyBayes_0.19.0.zip(r-4.7-any)flexyBayes_0.19.0.zip(r-4.6-any)flexyBayes_0.19.0.zip(r-4.5-any)
flexyBayes_0.19.0.tgz(r-4.6-any)flexyBayes_0.19.0.tgz(r-4.5-any)
flexyBayes_0.19.0.tar.gz(r-4.7-any)flexyBayes_0.19.0.tar.gz(r-4.6-any)
flexyBayes_0.19.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
flexyBayes/json (API)

# Install 'flexyBayes' in R:
install.packages('flexyBayes', repos = c('https://max578.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/aagi-aus/flexybayes/issues

Pkgdown/docs site:https://aagi-aus.github.io

Datasets:
  • met_example - Example Multi-Environment Trial (MET) Dataset

On CRAN:

Conda:

5.12 score 34 scripts 50 exports 7 dependencies

Last updated from:2944c62c86 (on main). Checks:4 OK, 1 NOTE, 4 ERROR. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK687
source / vignettesOK307
linux-releaseNOTE522
macos-releaseOK904
macos-oldrelERROR574
windows-develERROR549
windows-releaseERROR374
windows-oldrelERROR685
wasm-releaseOK157

Exports:augmentbackend_decisioncanonical_namescat_codefbfb_approxfb_as_draws_simplefb_backend_statusfb_brmsfb_check_refitfb_complete_gridfb_convergencefb_covfb_enginefb_engine_settingsfb_extension_apifb_fixed_designfb_from_asremlfb_from_brmsfb_gblup_cvfb_inlafb_inla_posterior_samplefb_isolated_lapplyfb_kfoldfb_known_variancefb_marginal_covfb_model_termsfb_model_weightsfb_offset_valuesfb_planfb_priorfb_refitfb_refusalsfb_refusefb_register_refusalsfb_response_valuesfb_variance_drawsflexybayesflexybayes_streamgenomic_summaryglanceis_fb_approxis_fb_covis_fb_engineprior_summaryproceedraneftidyvalidate_approximationvpredict

Dependencies:clidata.tablegenericslatticeMatrixmgcvnlme

Ordinal scores in a field trial
The two families | The trial | A cumulative model with the field | Category probabilities | A sequential model, and comparing the two | Engines and priors | What is refused | Reference

Last update: 2026-11-03
Started: 2026-11-03

Bayesian estimation in brief
Point estimates and distributions | The prior | The posterior | Functions of the parameters | Variances near zero | Small trials | Run time

Last update: 2026-10-16
Started: 2026-09-15

Mixed models in brief
The idea | Example | Heritability | Predicted genotype effects | Next

Last update: 2026-10-16
Started: 2026-09-15

ASReml and flexyBayes on the same trials
The whole trial | Smaller trials | Summary

Last update: 2026-10-16
Started: 2026-09-15

Moving from ASReml-R
The call | An alpha design | Genotype variances by environment | An effect on chosen levels: at(f, level) | Many trials, one variance each: empirical Bayes | Per-trial variances partially pooled | A sectioned residual and vpredict() | Unstructured covariance: us() | Autoregressive fields | Predicting a trial the fit has not seen | What flexyBayes refuses | Reading a posterior beside REML | Where the comparisons come from

Last update: 2026-10-16
Started: 2026-10-08

A two-stage analysis of a series of trials
The trials | Stage one: variety means per trial | Stage two: carrying the variances | Carrying the full covariance of the first stage

Last update: 2026-10-16
Started: 2026-09-20

The ASReml syntax flexyBayes covers
Fixed effects | Random effects | Residual | Families | Not supported

Last update: 2026-10-08
Started: 2026-09-15

Readme and manuals

Help Manual

Help pageTopics
Compare flexyBayes models on a plug-in information criterionanova.flexybayes
Posterior draws from a flexyBayes fitas_draws.flexybayes as_draws_df.flexybayes as_draws_matrix.flexybayes
Coerce an <fb_plan> to data.frame - one row, stable columnsas.data.frame.fb_plan
Augment a flexyBayes fit with fitted values and residualsaugment.flexybayes augment.flexybayes_inla
Backend dispatch trace for a flexyBayes fitbackend_decision
Canonical parameter-name view for a flexyBayes fitcanonical_names canonical_names.flexybayes_brms canonical_names.flexybayes_inla
Emit the generated backend code for a deferred review objectcat_code cat_code.flexybayes_review
Extract coefficients from a flexyBayes fitcoef.flexybayes coef.flexybayes_ordinal
Coefficients of a per-row INLA fitcoef.flexybayes_inla
Credible intervals for the fixed effects of a flexyBayes fitconfint.flexybayes
Credible intervals on the brms pathconfint.flexybayes_brms
Credible intervals for flexybayes_glmconfint.flexybayes_glm
Credible intervals for the fixed effects of a per-row INLA fitconfint.flexybayes_inla
emmeans support: estimation basis (default method)emm_basis.flexybayes emm_basis.flexybayes_inla
Extract model familyfamily.flexybayes
Response family of a per-row INLA fitfamily.flexybayes_inla
Construct an approximation-scheme specificationfb_approx
Report inference-backend readinessfb_backend_status
Fit a flexyBayes model via the brms (Stan) enginefb_brms
Complete a design grid before fittingfb_complete_grid
Construct a structured-covariance carrierfb_cov
Construct an inference-engine specificationfb_engine
Ingest an ASReml-format model specification into the flexyBayes IRfb_from_asreml
Ingest a brms-format formula into the flexyBayes IRfb_from_brms
Genomic-prediction accuracy by cross-validationfb_gblup_cv
Fit a flexyBayes model via the INLA enginefb_inla
Run jobs, each in its own R processfb_isolated_lapply
Exact K-fold cross-validation of an ordinal fitfb_kfold
The marginal covariance of the response of a fitted modelas.matrix.fb_marginal_cov fb_marginal_cov
Plan a flexyBayes fit without firing the backendfb_plan
Specify priors via the PC-canonical hybrid DSLfb_prior
Refit a model on new data, with added fixed columnsfb_refit
List flexyBayes refusal reasonsfb_refusals
Raise a registered refusalfb_refuse
Register a package's refusal reasonsfb_register_refusals
Joint posterior draws of the variance components of an INLA fitfb_variance_draws
Extract fitted valuesfitted.flexybayes
Fitted values of an aggregated count fitfitted.flexybayes_aggregated
In-sample fitted values from a per-row INLA fitfitted.flexybayes_inla
Bayesian Mixed Models with ASReml Syntaxfb flexybayes
Fit a mixed model to an out-of-core dataset by streaming aggregationflexybayes_stream
Extract model formulaformula.flexybayes
Fixed-effect model formula of a per-row INLA fitformula.flexybayes_inla
Genomic summary of a fitted relationship modelgenomic_summary
marginaleffects support: fixed-effect coefficients (default method)get_coef.flexybayes get_coef.flexybayes_inla
Model data accessor (default method)get_data.flexybayes get_data.flexybayes_inla
marginaleffects support: population-level predictions (default method)get_predict.flexybayes get_predict.flexybayes_inla
marginaleffects support: covariance (default method)get_vcov.flexybayes get_vcov.flexybayes_inla
Glance at a flexyBayes fitglance.flexybayes glance.flexybayes_inla
Test whether an object is an 'fb_approx' specificationis_fb_approx
Test whether an object is an 'fb_cov' carrieris_fb_cov
Test whether an object is an 'fb_engine' specificationis_fb_engine
Plug-in conditional log-likelihood of a flexyBayes fitlogLik.flexybayes
Log-likelihood on the brms pathlogLik.flexybayes_brms
Log-likelihood of a per-row INLA fit (not computed)logLik.flexybayes_inla
Approximate leave-one-out cross-validation for a flexyBayes fitloo.flexybayes
Example Multi-Environment Trial (MET) Datasetmet_example
Fixed-effect model matrix of a flexyBayes fitmodel.matrix.flexybayes
Number of observations a flexyBayes fit was fitted tonobs.flexybayes
Category probabilities of an ordinal fitfitted.flexybayes_ordinal ordinal_probabilities predict.flexybayes_ordinal
Plot diagnostics for a flexyBayes modelplot.flexybayes plot.flexybayes_aggregated plot.flexybayes_brms plot.flexybayes_glm plot.flexybayes_inla
Posterior predictive check for a flexyBayes fitpp_check.flexybayes
Predict from a brms-passthrough flexybayes fitpredict.flexybayes_brms
Population-level predictions from a per-row INLA fitpredict.flexybayes_inla print.fb_predict_new
Print an 'fb_approx' specificationprint.fb_approx
Print an 'fb_cov' carrierprint.fb_cov
Print an 'fb_engine' specificationprint.fb_engine
Print an <fb_plan> - flight-checklist formprint.fb_plan
Print a classify means tableprint.fb_predict_classify
Print a compact description of a flexyBayes fitprint.flexybayes
Print a flexybayes_aggregated objectprint.flexybayes_aggregated
Print method for the brms-passthrough flexybayes subclassprint.flexybayes_brms
Print a flexyBayes summaryprint.summary.flexybayes
Resolved-prior summary for a flexyBayes fitprior_summary prior_summary.default prior_summary.flexybayes_brms prior_summary.flexybayes_inla
Advance a deferred-execution object into its fitproceed proceed.flexybayes_review
Random-effect predictions from a flexyBayes fitranef ranef.flexybayes
emmeans support: recover model data (default method)recover_data.flexybayes recover_data.flexybayes_inla
Extract residualsresiduals.flexybayes
Residuals of an aggregated count fitresiduals.flexybayes_aggregated
Response residuals from a per-row INLA fitresiduals.flexybayes_inla
marginaleffects support: set coefficients (default method)set_coef.flexybayes set_coef.flexybayes_inla
Summarise an <fb_plan> - verbose formsummary.fb_plan
Summarise a flexyBayes fitsummary.flexybayes
Summarise a fit run on the aggregated representationsummary.flexybayes_aggregated
Summary for flexybayes GLM-compatible objectsummary.flexybayes_glm
Tidy a flexyBayes fit into a one-row-per-term data frametidy.flexybayes
Tidy a per-row INLA fit into a one-row-per-term data frametidy.flexybayes_inla
Re-fit a flexyBayes model with modified argumentsupdate.flexybayes
Validate an approximate model fit against its bias boundvalidate_approximation
Extract variance-covariance matrix of fixed effectsvcov.flexybayes
Posterior covariance of a per-row INLA fit's fixed effectsvcov.flexybayes_inla
Posterior functionals of the variance componentsvpredict vpredict.flexybayes