Description Usage Arguments Value Author(s) Examples

View source: R/NormalizeBoundedVariable.R

This transforms bounded variables so that they are not bounded.
First variables are coerced away from the boundaries. by a distance of `tol`

.
The natural log is used for variables bounded either above or below but not both.
The inverse of the standard normal cumulative distribution function
(the quantile function) is used for variables bounded above and below.

1 | ```
NormalizeBoundedVariable(x, constraints, tol = stats::pnorm(-5), trim = TRUE)
``` |

`x` |
A vector, matrix, array, or dataframe with value to be coerced into a range or set. |

`constraints` |
A list of constraints. See the examples below for formatting details. |

`tol` |
Variables will be forced to be at least this far away from the boundaries. |

`trim` |
If TRUE values in x < lower and values in x > upper will be set to lower and upper, respectively, before normalizing. |

An object of the same class as `x`

with the values
transformed so that they spread out over any part of the real
line.

A variable `x`

that is bounded below by `lower`

is
transformed to `log(x - lower)`

.

A variable `x`

that is bounded above by `upper`

is
transformed to `log(upper - x)`

.

A variable `x`

that is bounded below by `lower`

and
above by `upper`

is transformed to
`qnorm((x-lower)/(upper - lower))`

.

Stephen R. Haptonstahl srh@haptonstahl.org

1 2 3 |

```
```

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.