CumInt {coxsei}R Documentation

Cumulative intensity function

Description

Calculate the cumulative/integrated hazard/intensity function

Usage

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


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)")   

[Package coxsei version 0.3 Index]