ogive: Ogive

Description Usage Arguments Details Value Examples

View source: R/survivalfunctions.R

Description

Computes the ogive value for a given x

Usage

1
ogive(x, cdf, breaks)

Arguments

x

The value to pass to the ogive function

cdf

A cdf function to use (use ecdf on the data)

breaks

The breaks for the ogive function

Details

The cdf is computed before the ogive function is called so it doesn't have to be recomputed every time ogive(...) is called.

Value

The ogive value (between 0 and 1) for a given x and cdf function.

Examples

1
2
3
4
x <- c(8,9,13,15,16,22,23,27,29,35)
c <- c(0,10,15,20,30,40)
f <- ecdf(x)
plot(function(y) ogive(y,f,c), 0, 50, main="Ogive", ylab="F(x)")

nathanesau/lmodels documentation built on May 23, 2019, 12:19 p.m.