Learn R Programming

⚠️There's a newer version (1.3) of this package.Take me there.

FBMS (version 1.2)

Flexible Bayesian Model Selection and Model Averaging

Description

Implements the Mode Jumping Markov Chain Monte Carlo algorithm described in and its Genetically Modified counterpart described in as well as the sub-sampling versions described in for flexible Bayesian model selection and model averaging.

Copy Link

Version

Install

install.packages('FBMS')

Monthly Downloads

402

Version

1.2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Jon Lachmann

Last Published

September 12th, 2025

Functions in FBMS (1.2)

glm.loglik.g

Log likelihood function for glm regression with Zellner's g-prior and BIC-like approximations
get.best.model

Extract the Best Model from MJMCMC or GMJMCMC Results
logistic.loglik.ala

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.
get.mpm.model

Retrieve the Median Probability Model (MPM)
logistic.loglik

Log likelihood function for logistic regression with a Jeffreys parameter prior and BIC approximations of the posterior This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.
glm.loglik

Log likelihood function for glm regression with a Jeffreys parameter prior and BIC approximations of the posterior This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.
log_prior

Log model prior function
lm.logpost.bas

Log likelihood function for Gaussian regression with parameter priors from BAS package
p0p0

p0p0 polynomial term
plot.mjmcmc

Function to plot the results, works both for results from gmjmcmc and merged results from merge.results
p0pm1

p0pm1 polynomial terms
p0p2

p0p2 polynomial term
p0p05

p0p05 polynomial term
p0p1

p0p1 polynomial term
p0pm2

p0pm2 polynomial term
plot.mjmcmc_parallel

Plot a mjmcmc_parallel run
gaussian.loglik

Log likelihood function for gaussian regression with a Jeffreys prior and BIC approximation of MLIK with both known and unknown variance of the responses
predict.mjmcmc_parallel

Predict using a mjmcmc result object from a parallel run.
print.feature

Print method for "feature" class
relu

ReLu function
rmclapply

rmclapply: Cross-platform mclapply/forking hack for Windows
troot

Cube root function
p3

p3 polynomial term
gen.probs.mjmcmc

Generate a probability list for MJMCMC (Mode Jumping MCMC)
p2

p2 polynomial term
gen.probs.gmjmcmc

Generate a probability list for GMJMCMC (Genetically Modified MJMCMC)
gmjmcmc

Main algorithm for GMJMCMC (Genetically Modified MJMCMC)
glm.logpost.bas

Log likelihood function for glm regression with parameter priors from BAS package
mjmcmc.parallel

Run multiple mjmcmc runs in parallel, merging the results before returning.
model.string

Function to generate a function string for a model consisting of features
pm2

pm2 polynomial term
marginal.probs

Function for calculating marginal inclusion probabilities of features given a list of models
logistic.loglik.alpha

Log likelihood function for logistic regression for alpha calculation This function is just the bare likelihood function
nrelu

negative ReLu function
p0p3

p0p3 polynomial term
not

not x
ngelu

Negative GELU function
predict.bgnlm_model

Predict responses from a BGNLM model
nhs

negative heavy side function
predict.mjmcmc

Predict using a mjmcmc result object.
predict.gmjmcmc_parallel

Predict using a gmjmcmc result object from a parallel run.
sigmoid

Sigmoid function
set.transforms

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.
merge_results

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).
gmjmcmc.parallel

Run multiple gmjmcmc (Genetically Modified MJMCMC) runs in parallel returning a list of all results.
hs

heavy side function
sqroot

Square root function
sin_deg

Sine function for degrees
p05

p05 polynomial term
mjmcmc

Main algorithm for MJMCMC (Genetically Modified MJMCMC)
p0

p0 polynomial term
pm05

pm05 polynomial term
plot.gmjmcmc_merged

Plot a gmjmcmc_merged run
summary.gmjmcmc_merged

Function to print a quick summary of the results
pm1

pm1 polynomial term
summary.gmjmcmc

Function to print a quick summary of the results
plot.gmjmcmc

Function to plot the results, works both for results from gmjmcmc and merged results from merge.results
predict.gmjmcmc

Predict using a gmjmcmc result object.
summary.mjmcmc

Function to print a quick summary of the results
string.population.models

Function to get a character representation of a list of models
p0pm05

p0pm05 polynomial term
string.population

Function to get a character representation of a list of features
predict.gmjmcmc_merged

Predict using a merged gmjmcmc result object.
summary.mjmcmc_parallel

Function to print a quick summary of the results
diagn_plot

Plot convergence of best/median/mean/other summary log posteriors in time
erf

erf function
compute_effects

Compute effects for specified in labels covariates using a fitted model.
exoplanet

Excerpt from the Open Exoplanet Catalogue data set
FBMS-package

tools:::Rd_package_title("FBMS")
arcsinh

arcsinh transform
cos_deg

Cosine function for degrees
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
gaussian.loglik.alpha

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 squares
fbms

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.
exp_dbl

Double exponential function
gaussian_tcch_log_likelihood

Log likelihood function for Gaussian regression with parameter priors from BAS package
fbms.mlik.master

Master Log Marginal Likelihood Function
gaussian.loglik.g

Log likelihood function for linear regression using Zellners g-prior
gen.params.gmjmcmc

Generate a parameter list for GMJMCMC (Genetically Modified MJMCMC)
gen.params.mjmcmc

Generate a parameter list for MJMCMC (Mode Jumping MCMC)
gelu

GELU function