kernel_normal {fmcmc}R Documentation

Gaussian Transition Kernel

Description

Gaussian Transition Kernel

Usage

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"
)

Arguments

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 plan_update_sequence().

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.

Details

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).

Value

An object of class fmcmc_kernel. fmcmc_kernel objects are intended to be used with the MCMC() function.

See Also

Other kernels: kernel_adapt(), kernel_mirror, kernel_new(), kernel_ram(), kernel_unif()

Examples

# 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)
  )

[Package fmcmc version 0.5-2 Index]