Learn R Programming

FBMS (version 1.1)

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

274

Version

1.1

License

GPL-2

Maintainer

Jon Lachmann

Last Published

February 26th, 2025

Functions in FBMS (1.1)

abalone

Physical measurements of 4177 abalones, a species of sea snail.
erf

erf function
gelu

GELU function
gen.params.gmjmcmc

Generate a parameter list for GMJMCMC (Genetically Modified MJMCMC)
logistic.loglik.alpha

Log likelihood function for logistic regression for alpha calculation This function is just the bare likelihood function
marginal.probs

Function for calculating marginal inclusion probabilities of features given a list of models
get.best.model

Extract the Best Model from MJMCMC or GMJMCMC Results
gen.probs.mjmcmc

Generate a probability list for MJMCMC (Mode Jumping MCMC)
gaussian.loglik

Log likelihood function for gaussian regression with a prior p(m)=r*sum(total_width).
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-package

tools:::Rd_package_title("FBMS")
SangerData2

Gene expression data lymphoblastoid cell lines of all 210 unrelated HapMap individuals from four populations
hs

heavy side function
gmjmcmc

Main algorithm for GMJMCMC (Genetically Modified MJMCMC)
gmjmcmc.parallel

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

Retrieve the Median Probability Model (MPM)
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.
p0p1

p0p1 polynomial term
p0p2

p0p2 polynomial term
plot.mjmcmc

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

Gaussian function
p0

p0 polynomial term
exoplanet

Excerpt from the Open Exoplanet Catalogue data set
predict.bgnlm_model

Predict responses from a BGNLM model
p05

p05 polynomial term
p0pm1

p0pm1 polynomial terms
pm2

pm2 polynomial term
p0pm2

p0pm2 polynomial term
not

not x
exp_dbl

Double exponential function
sin_deg

Sine function for degrees
string.population

Function to get a character representation of a list of features
string.population.models

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

Square root function
nrelu

negative ReLu function
log_prior

Log model prior function
linear.g.prior.loglik

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

Generate a parameter list for MJMCMC (Mode Jumping MCMC)
gen.probs.gmjmcmc

Generate a probability list for GMJMCMC (Genetically Modified MJMCMC)
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).
logistic.loglik

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

Main algorithm for MJMCMC (Genetically Modified MJMCMC)
troot

Cube root function
predict.gmjmcmc_parallel

Predict using a gmjmcmc result object from a parallel run.
summary.mjmcmc

Function to print a quick summary of the results
predict.mjmcmc

Predict using a mjmcmc result object.
plot.mjmcmc_parallel

Plot a mjmcmc_parallel run
p3

p3 polynomial term
predict.mjmcmc_parallel

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

Print method for "feature" class
p2

p2 polynomial term
predict.gmjmcmc

Predict using a gmjmcmc result object.
predict.gmjmcmc_merged

Predict using a merged gmjmcmc result object.
summary.gmjmcmc_merged

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

Function to print a quick summary of the results
summary.mjmcmc_parallel

Function to print a quick summary of the results
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
p0p3

p0p3 polynomial term
plot.gmjmcmc

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

p0pm05 polynomial term
plot.gmjmcmc_merged

Plot a gmjmcmc_merged run
p0p05

p0p05 polynomial term
relu

ReLu function
p0p0

p0p0 polynomial term
pm05

pm05 polynomial term
pm1

pm1 polynomial term
rmclapply

rmclapply: Cross-platform mclapply/forking hack for Windows
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.
ngelu

Negative GELU function
nhs

negative heavy side 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.
sigmoid

Sigmoid function
to23

To the 2.3 power function
to35

To 3.5 power
to25

To 2.5 power
to72

To the 7/2 power function
diagn_plot

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

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

Cosine function for degrees
breastcancer

Breast Cancer Wisconsin (Diagnostic) Data Set