BoundNormalizedVariable: Take a normalized variable and transform it back to a bounded...

View source: R/BoundNormalizedVariable.R

BoundNormalizedVariableR Documentation

Take a normalized variable and transform it back to a bounded variable.

Description

This takes variables on the real line and constrains them to be on a half-line (constrained above or below) or a segment (constrained both above and below). This is approximately the inverse of NormalizeBoundedVariable; this does not completely reverse the effect of NormalizeBoundedVariable because NormalizeBoundedVariable first forces values away from the bounds, and this information is lost.

Usage

BoundNormalizedVariable(x, constraints)

Arguments

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.

Value

An object of the same class as x with the values transformed into the desired half-line or segment.

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

Examples

  constraints=list(lower=5)           # lower bound when constrining to an interval
  constraints=list(upper=10)          # upper bound when constraining to an interval
  constraints=list(lower=5, upper=10) # both lower and upper bounds

FastImputation documentation built on Sept. 25, 2023, 5:06 p.m.