Error series value object
error.RdBuild an error-series value object for create_observed_data()'s error
argument. Carries the error y-values, an optional unit, and an auxiliary
type.
The unit is not validated here: the error dimension is the values-series
dimension, which this helper does not see. create_observed_data()
validates the error unit against the values dimension when a unit is
present, and defaults the error unit to the values unit when unit is
NULL.
Arguments
- value
Numeric vector. Error y-values, same length as the values series.
- unit
Character. Optional unit for the error. Defaults (in the factory) to the values-series unit when
NULL.- type
Character. Auxiliary type for the error, one of the schema
AuxiliaryTypevalues:"ArithmeticStdDev"(the default),"GeometricStdDev","ArithmeticMeanPop", or"GeometricMeanPop".
Value
An error_spec object to pass to create_observed_data().
See also
Other value-object helpers:
age(),
fraction_unbound(),
gestational_age(),
height(),
intestinal_permeability(),
lipophilicity(),
permeability(),
solubility(),
time(),
values(),
weight()
Examples
error(c(0, 1.2, 1.5, 1.1, 0.6))
#> $value
#> [1] 0.0 1.2 1.5 1.1 0.6
#>
#> $unit
#> NULL
#>
#> $type
#> [1] "ArithmeticStdDev"
#>
#> attr(,"class")
#> [1] "error_spec" "osp_value_spec"