run_adap_metropolis_MCMC: run_adap_metropolis_MCMC

Description Usage Arguments Details Value Author(s) References See Also

View source: R/adaptative_mcmc_utilities.R

Description

Function to sample for a complex probabibility density function using MCMC with the adaptative Metropolis algorithm proposed by Roberts and Rosenthal(2009).

Usage

1
2
3
run_adap_metropolis_MCMC(startvalue, iterations = 10000,
  iter_update_par = 100, ptest, model, prior.pdf, prior.parameters,
  proposal.sigma, cov.corr = FALSE)

Arguments

startvalue

A numeric vector with the fit parameters of the pumping test.

iterations

An integer with the number of iterations to run the chain.

iter_update_par

An integet specifying the number of iterations to update the covariance matrix.

ptest

A pumping_test object.

model

A character string with the name of the model used in the parameter estimation.

prior.pdf

A character vector with the distributions of the fit parameters ( 'unif' and 'norm' are currently supported).

prior.parameters

A matrix with the parameters of the distributions (min and max for uniform distributions, mean and sd for normal distributions)

proposal.sigma

A numeric vector with the standard deviations of the proposal distribution.

cov.corr

A logical flag indicating if the covariance matrix must be corrected for positive definiteness.

Details

This function implements the adaptative MCMC proposed by Roberts and Rosenthal (2009), in which the proposal distribution Q_{n}(x, \cdot) is given by:

Q_{n}(x, \cdot) = ≤ft\{ \begin{aligned} &(1-θ)N(x, (2.38)^{2}Σ_{n}/d) + θ N(x,(0.1)^{2}I_{d}/d), &Σ_{n}\text{ is positive definite} \\ &N(x,(0.1)^{2}I_{d}), &Σ_{n}\text{ is not positive definitive}\\ \end{aligned} \right.

where

This proposal function is implemented in the function proposalfunction_cov.

Value

A matrix with the sampled values of the fit parameters.

Author(s)

Oscar Garcia-Cabrejo khaors@gmail.com

References

Roberts, G. O. & Rosenthal, J. S. Examples of adaptive MCMC Journal of Computational and Graphical Statistics, 2009, 18, 349-367.

See Also

Other amcmc_auxiliary_function functions: posterior, prior, proposalfunction_cov, proposalfunction


khaors/pumpingtest documentation built on Nov. 15, 2019, 8:10 p.m.