kernel_unif: Uniform Transition Kernel

View source: R/kernel_unif.R

kernel_unifR Documentation

Uniform Transition Kernel

Description

Uniform Transition Kernel

Usage

kernel_unif(min. = -1, max. = 1, fixed = FALSE, scheme = "joint")

kernel_unif_reflective(
  min. = -1,
  max. = 1,
  lb = min.,
  ub = max.,
  fixed = FALSE,
  scheme = "joint"
)

Arguments

min., max.

Passed to runif.

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_unif function provides a uniform transition kernel. This (symmetric) kernel function by default adds the current status values between [-1,1].

The kernel_unif_reflective is similar to kernel_unif with the main difference that proposals are bounded to be within ⁠[lb, ub]⁠.

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_normal(), kernel_ram()

Examples

# Multivariate setting with 4 parameters in which we set the kernel to make
# proposals one parameter at-a-time in a random ordering.
kern <- kernel_unif(scheme = "random")

fmcmc documentation built on Aug. 30, 2023, 1:09 a.m.