Package: FBMS 1.1

FBMS: Flexible Bayesian Model Selection and Model Averaging

Implements the Mode Jumping Markov Chain Monte Carlo algorithm described in <doi:10.1016/j.csda.2018.05.020> and its Genetically Modified counterpart described in <doi:10.1613/jair.1.13047> as well as the sub-sampling versions described in <doi:10.1016/j.ijar.2022.08.018> for flexible Bayesian model selection and model averaging.

Authors:Jon Lachmann [cre, aut], Aliaksandr Hubin [aut]

FBMS_1.1.tar.gz
FBMS_1.1.zip(r-4.5)FBMS_1.1.zip(r-4.4)FBMS_1.1.zip(r-4.3)
FBMS_1.1.tgz(r-4.5-x86_64)FBMS_1.1.tgz(r-4.5-arm64)FBMS_1.1.tgz(r-4.4-x86_64)FBMS_1.1.tgz(r-4.4-arm64)FBMS_1.1.tgz(r-4.3-x86_64)FBMS_1.1.tgz(r-4.3-arm64)
FBMS_1.1.tar.gz(r-4.5-noble)FBMS_1.1.tar.gz(r-4.4-noble)
FBMS_1.1.tgz(r-4.4-emscripten)FBMS_1.1.tgz(r-4.3-emscripten)
FBMS.pdf |FBMS.html
FBMS/json (API)

# Install 'FBMS' in R:
install.packages('FBMS', repos = c('https://jonlachmann.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • SangerData2 - Gene expression data lymphoblastoid cell lines of all 210 unrelated HapMap individuals from four populations
  • abalone - Physical measurements of 4177 abalones, a species of sea snail.
  • breastcancer - Breast Cancer Wisconsin (Diagnostic) Data Set
  • exoplanet - Excerpt from the Open Exoplanet Catalogue data set

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

cpp

2.45 score 28 scripts 301 downloads 60 exports 11 dependencies

Last updated 30 days agofrom:aac7cf4de8. Checks:12 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 28 2025
R-4.5-win-x86_64OKMar 28 2025
R-4.5-mac-x86_64OKMar 28 2025
R-4.5-mac-aarch64OKMar 28 2025
R-4.5-linux-x86_64OKMar 28 2025
R-4.4-win-x86_64OKMar 28 2025
R-4.4-mac-x86_64OKMar 28 2025
R-4.4-mac-aarch64OKMar 28 2025
R-4.4-linux-x86_64OKMar 28 2025
R-4.3-win-x86_64OKMar 28 2025
R-4.3-mac-x86_64OKMar 28 2025
R-4.3-mac-aarch64OKMar 28 2025

Exports:compute_effectscos_degdiagn_ploterfexp_dblfbmsgaussgaussian.loglikgaussian.loglik.alphagelugen.params.gmjmcmcgen.params.mjmcmcgen.probs.gmjmcmcgen.probs.mjmcmcget.best.modelget.mpm.modelgmjmcmcgmjmcmc.parallelhslinear.g.prior.logliklog_priorlogistic.logliklogistic.loglik.alalogistic.loglik.alphamarginal.probsmerge_resultsmjmcmcmjmcmc.parallelmodel.stringngelunhsnotnrelup0p05p0p0p0p05p0p1p0p2p0p3p0pm05p0pm1p0pm2p2p3pm05pm1pm2reluset.transformssigmoidsin_degsqrootstring.populationstring.population.modelsto23to25to35to72troot

Dependencies:BHbigmemorybigmemory.sridigestfastglmGenSAr2rRcppRcppEigenrlanguuid

FBMS - Flexible Bayesian Model Selection and Model Averaging

Rendered fromFBMS-guide.Rmdusingknitr::rmarkdownon Mar 28 2025.

Last update: 2025-02-26
Started: 2023-12-22

Readme and manuals

Help Manual

Help pageTopics
Flexible Bayesian Model Selection and Model AveragingFBMS-package FBMS
Physical measurements of 4177 abalones, a species of sea snail.abalone
Breast Cancer Wisconsin (Diagnostic) Data Setbreastcancer
Compute effects for specified in labels covariates using a fitted model.compute_effects
Cosine function for degreescos_deg
Plot convergence of best/median/mean/other summary log posteriors in timediagn_plot
erf functionerf
Excerpt from the Open Exoplanet Catalogue data setexoplanet
Double exponential functionexp_dbl
Fit a BGNLM model using Genetically Modified Mode Jumping Markov Chain Monte Carlo (MCMC) sampling. Or Fit a BGLM model using Modified Mode Jumping Markov Chain Monte Carlo (MCMC) sampling.fbms
Gaussian functiongauss
Log likelihood function for gaussian regression with a prior p(m)=r*sum(total_width).gaussian.loglik
Log likelihood function for gaussian regression for alpha calculation This function is just the bare likelihood function Note that it only gives a proportional value and is equivalent to least squaresgaussian.loglik.alpha
GELU functiongelu
Generate a parameter list for GMJMCMC (Genetically Modified MJMCMC)gen.params.gmjmcmc
Generate a parameter list for MJMCMC (Mode Jumping MCMC)gen.params.mjmcmc
Generate a probability list for GMJMCMC (Genetically Modified MJMCMC)gen.probs.gmjmcmc
Generate a probability list for MJMCMC (Mode Jumping MCMC)gen.probs.mjmcmc
Extract the Best Model from MJMCMC or GMJMCMC Resultsget.best.model
Retrieve the Median Probability Model (MPM)get.mpm.model
Main algorithm for GMJMCMC (Genetically Modified MJMCMC)gmjmcmc
Run multiple gmjmcmc (Genetically Modified MJMCMC) runs in parallel returning a list of all results.gmjmcmc.parallel
heavy side functionhs
Log likelihood function for linear regression using Zellners g-priorlinear.g.prior.loglik
Log model prior functionlog_prior
Log likelihood function for logistic regression with a prior p(m)=sum(total_width) This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.logistic.loglik
Log likelihood function for logistic regression with an approximate Laplace approximations used This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.logistic.loglik.ala
Log likelihood function for logistic regression for alpha calculation This function is just the bare likelihood functionlogistic.loglik.alpha
Function for calculating marginal inclusion probabilities of features given a list of modelsmarginal.probs
Merge a list of multiple results from many runs This function will weight the features based on the best marginal posterior in that population and merge the results together, simplifying by merging equivalent features (having high correlation).merge_results
Main algorithm for MJMCMC (Genetically Modified MJMCMC)mjmcmc
Run multiple mjmcmc runs in parallel, merging the results before returning.mjmcmc.parallel
Function to generate a function string for a model consisting of featuresmodel.string
Negative GELU functionngelu
negative heavy side functionnhs
not xnot
negative ReLu functionnrelu
p0 polynomial termp0
p05 polynomial termp05
p0p0 polynomial termp0p0
p0p05 polynomial termp0p05
p0p1 polynomial termp0p1
p0p2 polynomial termp0p2
p0p3 polynomial termp0p3
p0pm05 polynomial termp0pm05
p0pm1 polynomial termsp0pm1
p0pm2 polynomial termp0pm2
p2 polynomial termp2
p3 polynomial termp3
Function to plot the results, works both for results from gmjmcmc and merged results from merge.resultsplot.gmjmcmc
Plot a gmjmcmc_merged runplot.gmjmcmc_merged
Function to plot the results, works both for results from gmjmcmc and merged results from merge.resultsplot.mjmcmc
Plot a mjmcmc_parallel runplot.mjmcmc_parallel
pm05 polynomial termpm05
pm1 polynomial termpm1
pm2 polynomial termpm2
Predict responses from a BGNLM modelpredict.bgnlm_model
Predict using a gmjmcmc result object.predict.gmjmcmc
Predict using a merged gmjmcmc result object.predict.gmjmcmc_merged
Predict using a gmjmcmc result object from a parallel run.predict.gmjmcmc_parallel
Predict using a mjmcmc result object.predict.mjmcmc
Predict using a mjmcmc result object from a parallel run.predict.mjmcmc_parallel
Print method for "feature" classprint.feature
ReLu functionrelu
rmclapply: Cross-platform mclapply/forking hack for Windowsrmclapply
Gene expression data lymphoblastoid cell lines of all 210 unrelated HapMap individuals from four populationsSangerData2
Set the transformations option for GMJMCMC (Genetically Modified MJMCMC), this is also done when running the algorithm, but this function allows for it to be done manually.set.transforms
Sigmoid functionsigmoid
Sine function for degreessin_deg
Square root functionsqroot
Function to get a character representation of a list of featuresstring.population
Function to get a character representation of a list of modelsstring.population.models
Function to print a quick summary of the resultssummary.gmjmcmc
Function to print a quick summary of the resultssummary.gmjmcmc_merged
Function to print a quick summary of the resultssummary.mjmcmc
Function to print a quick summary of the resultssummary.mjmcmc_parallel
To the 2.3 power functionto23
To 2.5 powerto25
To 3.5 powerto35
To the 7/2 power functionto72
Cube root functiontroot