powered by
Calculate the cumulative/integrated hazard/intensity function
CumInt(x, int, ...)
the value at which to calculate the cumulative function value
the intensity/hazard rate function. Has to be vectorized.
the arguments to be passed in to control the behavior of the underlying integrate function.
integrate
The value(s) of the cumulative hazard function at the specified x value(s).
x
The validity of the user supplied intensity function is not checked.
Relies on the numerical integration routine of R.
# NOT RUN { 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)") # }
Run the code above in your browser using DataLab