logitTrans {lca}R Documentation

Transform data between vector in an n-simplex and real numbers.

Description

logitTrans takes a vector z of length n whose elements are non-negative and sum is less than one, and transforms it to the space of real numbers R^{n}. expitTrans performs the inverse operation.

Usage

logitTrans(z)
expitTrans(x)

Arguments

z a vector of non-negative values whose sum is strictly less than 1.
x a vector of arbitrary real values.

Details

logitTrans(z)_i = log (z_i / (1 - z_1 - ... - z_n))

and

expitTrans(x)_i = exp(x_i) / (1 + exp(x_1) + ... + exp(x_n))

Value

Both functions return a numeric vector of the same length as the input.

Author(s)

Robin Evans

See Also

logit

Examples

z = c(0.2, 0.4, 0.1)
x = logitTrans(z)
x

expitTrans(x)

[Package lca version 0.2 Index]