Package 'Rosenbrock'

Title: Extended Rosenbrock-Type Densities for Markov Chain Monte Carlo (MCMC) Sampler Benchmarking
Description: New Markov chain Monte Carlo (MCMC) samplers new to be thoroughly tested and their performance accurately assessed. This requires densities that offer challenging properties to the novel sampling algorithms. One such popular problem is the Rosenbrock function. However, while its shape lends itself well to a benchmark problem, no codified multivariate expansion of the density exists. We have developed an extension to this class of distributions and supplied densities and direct sampler functions to assess the performance of novel MCMC algorithms. The functions are introduced in "An n-dimensional Rosenbrock Distribution for MCMC Testing" by Pagani, Wiegand and Nadarajah (2019) <arXiv:1903.09556>.
Authors: Martin Wiegand
Maintainer: Martin Wiegand <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2024-10-14 03:46:15 UTC
Source: https://github.com/cran/Rosenbrock

Help Index


Density Function "Even Rosenbrock Function"

Description

Density function for the full rosenbrock function, with two vector parameters a and b.

Usage

deven(x,a,b,mu)

Arguments

x

Input vector.

mu

Density shift.

a

Parameters for odd index input.

b

Parameters for even index input.

Value

Returns the density value of the "even" Rosenbrock distribution at point x for parameters mu,a and b.

Examples

x = rep(1,4)
a = b = rep(2,2)
mu = rep(1,2)

deven(x = x,a = a,b = b,mu = mu)

Density Function "Full Rosenbrock Function"

Description

Density function for the full rosenbrock function, with two vector parameters a and b.

Usage

dfull(x,a,b,mu)

Arguments

x

Input vector.

mu

Density shift.

a

First parameters.

b

Second parameters.

Value

Returns the density value of the "full" Rosenbrock distribution at point x for parameters mu,a and b.

Examples

x = rep(1,4)
a = b = rep(2,3)
mu = 1

dfull(x = x,mu = mu,a = a,b = b)

Density Function "Hybrid Rosenbrock Function"

Description

Density function for the hybrid rosenbrock function, with two list of vectors parameters b and input x/ xprime.

Usage

dhybrid(xprime,x,a,b,mu)

Arguments

xprime

Central input.

x

List of input vector blocks.

mu

Density shift.

a

Parameters for xprime.

b

List of parameters corresponding to input blocks.

Value

Returns the density value of the "hybrid" Rosenbrock distribution at point x/xprime for parameters mu,a and b.

Examples

a <- 1
xprime <- 1
mu <- - 1

x <- list(c(1,2),
          c(2,3))

b <- list(c(3,2),
          c(2,2))

dhybrid(xprime = xprime,x = x,a = a,b = b,mu = mu)

Random Sampler for the "Even Rosenbrock Function"

Description

Random sampler for the full Rosenbrock function, with two vector parameters a and b.

Usage

reven(n,a,b,mu)

Arguments

n

Sample size.

mu

Density shift.

a

Parameters for odd index input.

b

Parameters for even index input.

Value

Returns a sample of size n from the "full" Rosenbrock distribution.

Examples

n = 100
a = b = rep(2,2)
mu = rep(1,2)

reven(n = n,mu = mu,a = a,b = b)

Random Sampler for the "Hybrid Rosenbrock Function"

Description

Random Sampler for the hybrid rosenbrock function, with two list of vectors parameters b and input x/ xprime.

Usage

rhybrid(n,a,b,mu)

Arguments

n

Sample size.

mu

Density shift.

a

Parameters for xprime.

b

List of parameters corresponding to input blocks.

Value

Returns a sample of size n from the "hybrid" Rosenbrock distribution.

Examples

a <- 1
mu <- - 1

b <- list(c(3,2),
          c(2,2))

n <- 100

rhybrid(n = n,a = a,b = b,mu = mu)