bm_marginal: Mapper for marginal distribution transformation

View source: R/mappers.R

bm_marginalR Documentation

Mapper for marginal distribution transformation

Description

Constructs a mapper that transforms the marginal distribution state from \textrm{N}(0,1) to the distribution of a given (continuous) quantile function. The ... arguments are used as parameter arguments to qfun, pfun, dfun, and dqfun.

Usage

bm_marginal(qfun, pfun = NULL, dfun = NULL, dqfun = NULL, ..., inverse = FALSE)

bru_mapper_marginal(...)

Arguments

qfun

A quantile function, supporting arguments p, lower.tail, and log.p, like stats::qnorm().

pfun

A CDF, supporting arguments q, lower.tail, and log.p, like stats::pnorm(). Only needed and used when xor(mapper[["inverse"]], reverse) is TRUE in a method call. Default NULL

dfun

A pdf, supporting arguments x and log, like stats::dnorm(). If NULL (default), uses finite differences on qfun or pfun instead.

dqfun

A function evaluating the reciprocal of the derivative of qfun, i.e. the density at a given CDF value. If NULL (default), uses dfun(qfun(...),...) or finite differences on qfun or pfun instead. Must support the same arguments as qfun.

...

Arguments passed on to bm_marginal()

inverse

logical; If FALSE (default), bm_marginal() defines a mapping from standard Normal to a specified distribution. If TRUE, it defines a mapping from the specified distribution to a standard Normal.

Value

A bm_marginal mapper object.

See Also

bru_mapper, bru_mapper_generics

Other mappers: bm_aggregate(), bm_collect(), bm_const(), bm_expr(), bm_factor(), bm_fm_mesh_1d, bm_fmesher(), bm_harmonics(), bm_index(), bm_linear(), bm_logitaverage(), bm_logsumexp(), bm_matrix(), bm_multi(), bm_pipe(), bm_reparam(), bm_repeat(), bm_scale(), bm_shift(), bm_sum(), bm_taylor(), bru_get_mapper(), bru_mapper()

Examples

m <- bm_marginal(qexp, pexp, rate = 1 / 8)
(val <- ibm_eval(m, state = -5:5))
ibm_eval(m, state = val, reverse = TRUE)
m <- bm_marginal(qexp, pexp, dexp, rate = 1 / 8)
ibm_eval2(m, state = -3:3)


inlabru documentation built on July 28, 2026, 9:07 a.m.