mcmc.sub: Metropolis-Hastings Sampler Adapted for Divide-and-Conquer...

Description Usage Arguments Details Value References

View source: R/mcmc_sub.R

Description

A basic Metropolis-Hastings sampler for parameter estimation. Includes additional parameters for use with divide-and-conquer methods.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mcmc.sub(
  para,
  startval,
  niter,
  X,
  prior,
  likelihood,
  propvar = NULL,
  burn.rate = 0.1,
  chains = 1,
  num = 1
)

Arguments

para

Parameters to be estimate.

startval

Initial value of the chain.

niter

Number of iterations (including burned iterations).

X

Matrix of observations from the underlying model.

prior

Prior function for the parameters.

likelihood

Likelihood function.

propvar

The diagonal of the variance matrix for the proposal distribution. If no value is specified, the identify matrix is used.

burn.rate

The percentage of iterations to be burned.

chains

Number of subsets in the simulation. Used when a divide-and-conquer algorithm is employed

num

Numerator of the sub-posterior exponent (Wu and Robert, 2019). Used when a divide-and-conquer algorithm is employed.

Details

In the divide-and-conquer scheme, the data set X is divided into K subsets X_k. The subposterior for subset X_k is thus

π_k(θ | X_k) ∝ (π(θ)^(1/K) ∏ p(x|θ))^λ

See Wu and Robert (2019) for more details.

Value

A list with the following items:

Chains

A dataframe containing the chain iterations that were not burned.

Estimates

The parameter estimates.

Log-Likelihood

A dataframe containing the value of the likelihood function and the prior for each point of the chain.

References

Changye Wu and Christian P. Robert. Parallelising MCMC via Random Forests. arXiv e-prints, art. arXiv:1911.09698, 2019.


JacobRaymond/ConquerMCMC documentation built on May 12, 2020, 1:03 a.m.