mh.fun | R Documentation |
Proposals are made based on a (conditional) truncated Gaussian distribution at indices ind
given other components.
mh.fun(cur, lb, ub, prior.fun, lik.fun, ll, ind, pmu, pcov, cond = TRUE,
transform = FALSE, ...)
cur |
current value of the vector of parameters of which one component is to be updated. |
lb |
lower bounds for the parameter of interest. Default to |
ub |
upper bounds for the parameters of interest. Default to |
prior.fun |
log prior function, a function of the parameter to update. |
lik.fun |
log-likelihood function, a function of the parameters to update. The user who wants to keep results of intermediate can pass them via attributes. |
ll |
value of the log-likelihood at |
ind |
indices of |
pmu |
proposal mean; if missing, default to random walk. |
pcov |
covariance matrix of the proposal for |
cond |
logical; should updates be made conditional on other values in |
transform |
logical; should individual updates for each parameter be performed on the unconstrained space? If |
... |
additional arguments passed to the function, currently ignored. |
a list with components
ll
: value of the log-likelihood, with potential additional parameters passed as attributes;
cur
: values of the parameters after update;
accept
: logical indicating the proposal has been accepted (TRUE
) or rejected (FALSE
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.