Learn R Programming

decisionSupport (version 1.103.8)

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, ...)

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.

Value

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

Element R-type Explanation
distribution character Distribution type of the estimate
lower numeric 5%-quantile of the estimate
median numeric or NULL 50%-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.

Details

It must hold that lower <= upper.

The structure of the input arguments

Mandatory input elements

Argument R-type Explanation
distribution character Distribution type of the estimate
lower numeric 5%-quantile of the estimate

Optional input elements

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

Argument R-type Explanation
variable character Variable name
median cf. below 50%-quantile of the estimate

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