elev: Empirical Limited Expected Value

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/elev.R

Description

Compute the empirical limited expected value for individual or grouped data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
elev(x, ...)

## Default S3 method:
elev(x, ...)

## S3 method for class 'grouped.data'
elev(x, ...)

## S3 method for class 'elev'
print(x, digits = getOption("digits") - 2, ...)

## S3 method for class 'elev'
summary(object, ...)

## S3 method for class 'elev'
knots(Fn, ...)

## S3 method for class 'elev'
plot(x, ..., main = NULL, xlab = "x", ylab = "Empirical LEV")

Arguments

x

a vector or an object of class "grouped.data" (in which case only the first column of frequencies is used); for the methods, an object of class "elev", typically.

digits

number of significant digits to use, see print.

Fn, object

an R object inheriting from "ogive".

main

main title.

xlab, ylab

labels of x and y axis.

...

arguments to be passed to subsequent methods.

Details

The limited expected value (LEV) at u of a random variable X is E[X ^ u] = E[min(X, u)]. For individual data x[1], …, x[n], the empirical LEV En[X ^ u] is thus

En[X ^ u] = (sum(x[j] < u; 1) + sum(x[j] >= u; u))/n.

Methods of elev exist for individual data or for grouped data created with grouped.data. The formula in this case is too long to show here. See the reference for details.

Value

For elev, a function of class "elev", inheriting from the "function" class.

Author(s)

Vincent Goulet vincent.goulet@act.ulaval.ca and Mathieu Pigeon

References

Klugman, S. A., Panjer, H. H. and Willmot, G. E. (1998), Loss Models, From Data to Decisions, Wiley.

See Also

grouped.data to create grouped data objects; stepfun for related documentation (even though the empirical LEV is not a step function).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(gdental)
lev <- elev(gdental)
lev
summary(lev)
knots(lev)            # the group boundaries

lev(knots(lev))       # empirical lev at boundaries
lev(c(80, 200, 2000)) # and at other limits

plot(lev, type = "o", pch = 16)

Example output

Attaching package: 'actuar'

The following object is masked from 'package:grDevices':

    cm

Empirical LEV 
Call: elev(x = gdental)
 cj[1:11] =      0,     25,     50,  ...,   2500,   4000
Empirical LEV:	  10 unique values with summary
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    0.0    75.0   250.0   915.9  1250.0  4000.0 
 [1]    0   25   50  100  150  250  500 1000 1500 2500 4000
 [1]   0.00000  24.00794  45.99868  84.16005 115.77381 164.84788 238.26058
 [8] 299.76852 324.90079 347.38757 353.33995
[1]  69.80026 142.46032 339.78175

actuar documentation built on May 31, 2021, 9:10 a.m.