Learn R Programming

decisionSupport (version 1.114)

estimate1d: Create a 1-dimensional estimate object.

Description

estimate1d creates an object of class estimate1d. The estimate of a one dimensional variable is at minimum defined by the type of a univariate parametric distribution, the 5% - and 95% quantiles. Optionally, the median can be supplied.

as.estimate1d tries to transform an object to class estimate1d.

Usage

estimate1d(distribution, lower, upper, ...)

as.estimate1d(x, ...)

Value

An object of class estimate1d and list with at least (!) the elements:

ElementR-typeExplanation
distributioncharacterDistribution type of the estimate
lowernumeric5%-quantile of the estimate
mediannumeric or NULL50%-quantile of the estimate
uppernumeric95%-quantile of the estimate

Note that the median is a mandatory element of an estimate1d, although it is not necessary as input. If median is numeric it holds that:

lower <= median <= upper. In any case an estimate1d object has the property

lower <= upper.

Arguments

distribution

character: A character string that defines the type of the univariate parametric distribution.

lower

numeric: lower bound of the 90% confidence interval, i.e the 5%-quantile of this estimate.

upper

numeric: upper bound of the 90% confidence interval, i.e the 95%-quantile of this estimate.

...

arguments that can be coerced to a list comprising further elements of the 1-d estimate (for details cf. below). Each element must be atomic and of length 1 (1-d property).

x

an object to be transformed to class estimate1d.

Details

It must hold that lower <= upper.

The structure of the input arguments

Mandatory input elements

ArgumentR-typeExplanation
distributioncharacterDistribution type of the estimate
lowernumeric5%-quantile of the estimate
uppernumeric95%-quantile of the estimate

Optional input elements

The optional parameters in ... provide additional characteristics of the 1-d estimate. Frequent optional elements are:

ArgumentR-typeExplanation
variablecharacterVariable name
mediancf. below50%-quantile of the estimate
methodcharacterMethod for calculation of distribution parameters

The median

If supplied as input, median can be either NULL, numeric or the character string "mean". If it is NA it is set to NULL; if it equals "mean" it is set to mean(c(lower, upper)); if it is numeric it must hold that lower <= median <= upper. In case that no element median is provided, the default is median=NULL.

See Also

random.estimate1d