mjmcmc {FBMS} | R Documentation |
Main algorithm for MJMCMC (Genetically Modified MJMCMC)
Description
Main algorithm for MJMCMC (Genetically Modified MJMCMC)
Usage
mjmcmc(
data,
loglik.pi,
N = 100,
probs = NULL,
params = NULL,
sub = FALSE,
verbose = TRUE
)
Arguments
data |
A matrix containing the data to use in the algorithm, first column should be the dependent variable, second should be the intercept and the rest of the columns should be the independent variables. |
loglik.pi |
The (log) density to explore |
N |
The number of iterations to run for |
probs |
A list of the various probability vectors to use |
params |
A list of the various parameters for all the parts of the algorithm |
sub |
An indicator that if the likelihood is inexact and should be improved each model visit (EXPERIMENTAL!) |
verbose |
A logical denoting if messages should be printed |
Value
A list containing the following elements:
models |
All visited models. |
accept |
Average acceptance rate of the chain. |
lo.models |
All models visited during local optimization. |
best.crit |
The highest log marginal probability of the visited models. |
marg.probs |
Marginal probabilities of the features. |
model.probs |
Marginal probabilities of all of the visited models. |
model.probs.idx |
Indices of unique visited models. |
populations |
The covariates represented as a list of features. |
Examples
result <- mjmcmc(matrix(rnorm(600), 100), gaussian.loglik)
summary(result)
plot(result)