Learn R Programming

mbbefd (version 0.8.13)

etl: Empirical total loss

Description

Compute the empirical total loss.

Usage

etl(x, na.rm=FALSE)

Value

A numeric value or a vector.

Arguments

x

numeric vector of the observations.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Author

Dutang Christophe

Details

Compute the empirical total loss defined as the proportion of full destruction rates, that is observations that equal 1.

Examples

Run this code
x <- c(1, 0.000495134903027804, 0.787229130724068, 0.71154311082138, 
0.0669802789251427, 0.310872967333683, 1, 1, 1, 1, 0.162030982251957, 
1, 1, 0.322530106394859, 1, 1, 1, 0.60805410798081, 0.660941675188664, 1)

#empirical total loss (true value is 1/2)
etl(x)

Run the code above in your browser using DataLab