yada_sample_mcmc: Sample a likelihood function at a given temperature using an...

Description Usage Arguments Value

View source: R/yada_mcmc.R

Description

Given an input negative log-likelihood and temperature, do MCMC sampling of the parameter vector. Let eta be the value of the negative log-likelihood. The function that is sampled is exp(-eta/temp), where temp is the temperature; that is, the likelihood^(1/temp) is sampled. The proposal is made using an independent normal draw for each variable in the parameter vector, theta, with the standard deviation of the proposal distribution set by the scalar parameter prop_scale (the same scale is used for all variables).

The output is a list with starting and sampling information ,and includes the following named elements:

Usage

1
yada_sample_mcmc(neg_log_lik, theta0, num_samp, temp, prop_scale, ...)

Arguments

neg_log_lik

The function for the negative log-likelihood

theta0

The initial value of the parameter vector

num_samp

The number of samples to make

temp

The temperature

prop_scale

A scalar value for the standard deviation of the proposal distribution

...

Variables required by neg_log_lik

Value

A list containing starting and sampling information (see description)


MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.