posterior1: Posterior function

Description Usage Arguments Value See Also

View source: R/mcmc_functions.R

Description

Combines the likelihood and priors to produce a likelihood value for the given parameters against he provided data. This is used as the overall cost function for the MCMC algorithm.

Usage

1
2
posterior1(params, param_transform_table, param_table, data,
  LIKELIHOOD_FUNCTION, MODEL_FUNCTION)

Arguments

params

a vector of parameters to be explored

param_transform_table

a matrix of flags and bounds as required by proposalfunction for the random walk proposal, for use in the likelihood function

param_table

a data table as imported by load_param_table to be used by the prior wrapper function in finding the correct prior function and arguments

data

the data of interest

LIKELIHOOD_FUNCTION

a valid pointer to an R function which returns a single, log likelihood of the data given the current parameters

MODEL_FUNCTION

a valid pointer to an R function which is used to evaluate the model for the current set of parameters

Value

a single value for the posterior (by Bayes rule)

See Also

prior


jameshay218/mcmcJH documentation built on May 18, 2019, 11:20 a.m.