ogive {actuar} | R Documentation |
Compute a smoothed empirical distribution function for grouped data.
ogive(x, y = NULL, ...) ## S3 method for class 'ogive': print(x, digits = getOption("digits") - 2, ...) ## S3 method for class 'ogive': summary(object, ...) ## S3 method for class 'ogive': knots(Fn, ...) ## S3 method for class 'ogive': plot(x, main = NULL, xlab = "x", ylab = "F(x)", ...)
x |
an object of class "grouped.data" or a vector of group
boundaries in ogive ; for the methods, an object of class
"ogive" , typically. |
y |
a vector of group frequencies; used only if x does not
inherit from class "grouped.data" . |
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. |
The ogive of a grouped data set links the values of the empirical cumulative distribution known at group boundaries by straight line segments, resulting in an approximation of the empirical cdf.
The equation of the ogive is
Fn(x) = ((c[j] - x) Fn(c[j-1]) + (x - c[j-1]) Fn(c[j]))/(c[j] - c[j-1])
for c[j-1] < x <= c[j] and where c[0], ..., c[r] are the r + 1 group boundaries.
For ogive
, a function of class "ogive"
, inheriting from the
"function"
class.
Vincent Goulet vincent.goulet@act.ulaval.ca and Mathieu Pigeon
Klugman, S. A., Panjer, H. H. and Willmot, G. E. (1998), Loss Models, From Data to Decisions, Wiley.
grouped.data
to create grouped data objects;
approxfun
, which is used to compute the ogive;
stepfun
for related documentation (even though the ogive
is not a step function).
data(gdental) Fn <- ogive(gdental) Fn summary(Fn) knots(Fn) # the group boundaries Fn(knots(Fn)) # true values of the empirical cdf Fn(c(80, 200, 2000)) # linear interpolations plot(Fn)