CumInt: Cumulative intensity function

Description Usage Arguments Details Value Warning Note Author(s) Examples

View source: R/CumInt.R

Description

Calculate the cumulative/integrated hazard/intensity function

Usage

1
CumInt(x, int, ...)

Arguments

x

the value at which to calculate the cumulative function value

int

the intensity/hazard rate function. Has to be vectorized.

...

the arguments to be passed in to control the behavior of the underlying integrate function.

Details

Relies on the numerical integration routine of R.

Value

The value(s) of the cumulative hazard function at the specified x value(s).

Warning

The validity of the user supplied intensity function is not checked.

Note

Not intended to be called by the user directly.

Author(s)

Feng Chen <feng.chen@unsw.edu.au>

Examples

1
2
curve(CumInt(x,int=function(y)1*( y>=0 & y<2)+3*(y>=2 & y<3)+1*(y>=3)),
      0,5,xlab="t",ylab="H(t) of a piece-wise constant hazard fun h(t)")   

coxsei documentation built on Feb. 8, 2020, 9:07 a.m.