View source: R/kernel_normal.R
kernel_normal | R Documentation |
Gaussian Transition Kernel
kernel_normal(mu = 0, scale = 1, fixed = FALSE, scheme = "joint")
kernel_normal_reflective(
mu = 0,
scale = 1,
lb = -.Machine$double.xmax,
ub = .Machine$double.xmax,
fixed = FALSE,
scheme = "joint"
)
mu, scale |
Either a numeric vector or a scalar. Proposal mean and scale. If scalar, values are recycled to match the number of parameters in the objective function. |
fixed, scheme |
For multivariate functions, sets the update plan.
See |
lb, ub |
Either a numeric vector or a scalar. Lower and upper bounds for bounded kernels. When of length 1, the values are recycled to match the number of parameters in the objective function. |
The kernel_normal
function provides the canonical normal kernel
with symmetric transition probabilities.
The kernel_normal_reflective
implements the normal kernel with reflective
boundaries. Lower and upper bounds are treated using reflecting boundaries, this is,
if the proposed \theta'
is greater than the ub
, then \theta' - ub
is subtracted from ub
. At the same time, if it is less than lb
, then
lb - \theta'
is added to lb
iterating until \theta
is within
[lb, ub]
.
In this case, the transition probability is symmetric (just like the normal kernel).
An object of class fmcmc_kernel. fmcmc_kernel
objects are intended
to be used with the MCMC()
function.
Other kernels:
kernel_adapt()
,
kernel_mirror
,
kernel_new()
,
kernel_ram()
,
kernel_unif()
# Normal kernel with a small scale (sd) of 0.05
kern <- kernel_normal(scale = 0.05)
# Using boundaries for the second parameter of a two parameter chain
# to have values in [0, 100].
kern <- kernel_normal_reflective(
ub = c(.Machine$double.xmax, 100),
lb = c(-.Machine$double.xmax, 0)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.