Learn R Programming

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

GMJMCMC

The GMJMCMC package provides functions to estimate Bayesian Generalized nonlinear models (BGNLMs) through a Genetically Modified Mode Jumping MCMC algorithm.

Installation and getting started

To install and load the package, just run

library(devtools)
install_github("jonlachmann/GMJMCMC", force=T, build_vignettes=T)
library(GMJMCMC)

With the package loaded, a vignette that shows how to run the package is available by running

vignette("GMJMCMC-guide")

Copy Link

Version

Install

install.packages('FBMS')

Monthly Downloads

274

Version

1.0

License

GPL-2

Maintainer

Jon Lachmann

Last Published

December 21st, 2023

Functions in FBMS (1.0)

mjmcmc.parallel

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

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

pm05 polynomial term
pm1

pm1 polynomial term
not

not x
gen.probs.mjmcmc

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

pm2 polynomial term
gmjmcmc

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

Predict using a gmjmcmc result object.
nrelu

negative ReLu function
p0p0

p0p0 polynomial term
plot.mjmcmc_parallel

Plot a mjmcmc_parallel run
predict.gmjmcmc_parallel

Predict using a gmjmcmc result object from a parallel run.
string.population.models

Function to get a character respresentation of a list of models
plot.mjmcmc

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

p0p05 polynomial term
string.population

Function to get a character respresentation of a list of features
p0

p0 polynomial term
predict.gmjmcmc_merged

Predict using a merged gmjmcmc result object.
mjmcmc

Main algorithm for MJMCMC (Genetically Modified MJMCMC)
linear.g.prior.loglik

Log likelihood function for linear regression using Zellners g-prior
hs

heavy side function
summary.mjmcmc

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

Function to print a quick summary of the results
p2

p2 polynomial term
to35

To 3.5 power
print.feature

Print method for "feature" class
p05

p05 polynomial term
p3

p3 polynomial term
relu

ReLu function
plot.gmjmcmc

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

To the 2.3 power 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.
plot.gmjmcmc_merged

Plot a gmjmcmc_merged run
to25

To 2.5 power
sigmoid

Sigmoid function
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
model.string

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

p0p1 polynomial term
to72

To the 7/2 power function
sqroot

Square root function
p0p2

p0p2 polynomial term
sin_deg

Sine function for degrees
predict.mjmcmc

Predict using a mjmcmc result object.
predict.mjmcmc_parallel

Predict using a mjmcmc result object from a parallel run.
troot

Cube root function
p0p3

p0p3 polynomial term
p0pm05

p0pm05 polynomial term
p0pm1

p0pm1 polynomial terms
p0pm2

p0pm2 polynomial term
summary.gmjmcmc_merged

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

Function to print a quick summary of the results
erf

erf function
FBMS-package

tools:::Rd_package_title("FBMS")
exoplanet

Excerpt from the Open Exoplanet Catalogue data set
cos_deg

Cosine function for degrees
diagn_plot

Plot convergence of best/median/mean/other summary log posteriors in time
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
gen.probs.gmjmcmc

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

GELU function
gauss

Gaussian function
compute_effects

Compute effects for specified in labels covariates using a fitted model.
gen.params.mjmcmc

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

Generate a parameter list for GMJMCMC (Genetically Modified MJMCMC)
ngelu

Negative GELU function
merge_results

Merge a list of multiple results from many runs This function will weight the features based on the best mlik in that population and merge the results together, simplifying by merging equivalent features (having high correlation).
nhs

negative heavy side function
breastcancer

Breast Cancer Wisconsin (Diagnostic) Data Set
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