transformations {pomp}R Documentation

Transformations

Description

Some useful parameter transformations.

Usage

logit(p)

expit(x)

log_barycentric(X)

inv_log_barycentric(Y)

Arguments

p

numeric; a quantity in [0,1].

x

numeric; the log odds ratio.

X

numeric; a vector containing the quantities to be transformed according to the log-barycentric transformation.

Y

numeric; a vector containing the log fractions.

Details

Parameter transformations can be used in many cases to recast constrained optimization problems as unconstrained problems. Although there are no limits to the transformations one can implement using the parameter_trans facilty, pomp provides a few ready-built functions to implement some very commonly useful ones.

The logit transformation takes a probability pp to its log odds, logp1p\log\frac{p}{1-p}. It maps the unit interval [0,1][0,1] into the extended real line [,][-\infty,\infty].

The inverse of the logit transformation is the expit transformation.

The log-barycentric transformation takes a vector XR+nX\in{R^{n}_+}, to a vector YRnY\in{R^n}, where

Yi=logXijXj.Y_i = \log\frac{X_i}{\sum_j X_j}.

The transformation is not one-to-one. However, for each c>0c>0, it maps the simplex {XR+n:iXi=c}\{X\in{R^n_+}:\sum_i X_i = c\} bijectively onto nn-dimensional Euclidean space RnR^n.

The inverse of the log-barycentric transformation is implemented as inv_log_barycentric. Note that it is not a true inverse, in the sense that it takes RnR^n to the unit simplex, {XR+n:iXi=1}\{X\in{R^n_+}:\sum_i X_i = 1\}. Thus,

    log_barycentric(inv_log_barycentric(Y)) == Y,

but

    inv_log_barycentric(log_barycentric(X)) == X

only if sum(X) == 1.

See Also

More on implementing POMP models: Csnippet, accumvars, basic_components, betabinomial, covariates, dinit_spec, dmeasure_spec, dprocess_spec, emeasure_spec, eulermultinom, parameter_trans(), pomp-package, pomp_constructor, prior_spec, rinit_spec, rmeasure_spec, rprocess_spec, skeleton_spec, userdata, vmeasure_spec


[Package pomp version 5.11.0.0 Index]