transformations | R Documentation |

Some useful parameter transformations.

```
logit(p)
expit(x)
log_barycentric(X)
inv_log_barycentric(Y)
```

`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. |

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 `p`

to its log odds, `\log\frac{p}{1-p}`

.
It maps the unit interval `[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 `X_i`

, `i=1,\dots,n`

, to a vector `Y_i`

, where

`Y_i = \log\frac{X_i}{\sum_j X_j}.`

If `X`

is an `n`

-vector, it takes every simplex defined by `\sum_i X_i = c`

, `c`

constant, to n-dimensional Euclidean space `R^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 `R^n`

to the *unit* simplex, `\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`

.

More on implementing POMP models:
`Csnippet`

,
`accumulator variables`

,
`basic components`

,
`betabinomial`

,
`covariates`

,
`distributions`

,
`dmeasure specification`

,
`dprocess specification`

,
`emeasure specification`

,
`parameter transformations`

,
`pomp-package`

,
`pomp`

,
`prior specification`

,
`rinit specification`

,
`rmeasure specification`

,
`rprocess specification`

,
`skeleton specification`

,
`userdata`

,
`vmeasure specification`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.