plotCHR: Plot the Nelson-Aalen estimator

Description Usage Arguments Author(s) References See Also Examples

Description

Function for computing and plotting the Nelson-Aalen estimator of the cumulative hazard rate between two times.

Usage

1
plotCHR(dat,tmin,tmax,N)

Arguments

dat

data from which the estimator is to be computed.

tmin

the estimator is computed from time tmin to time tmax.

tmax

the estimator is computed from time tmin to time tmax. In addition, tmax is greater than tmin.

N

size of the grid plot.

Author(s)

Romain Azais

References

Andersen P.K., Borgan O., Gill R.D., Keiding N. Statistical models based on counting processes Springer Series in Statistics. Springer-Verlag, New-York (1993)

See Also

CHR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# plotCHR

# Simulation of 50 independent exponential random variables
dat<-rexp(50,1)

# Nelson-Aalen estimator of cumulative hazard rate between 0 and 2
plotCHR(dat,0,2,20)

# Theoretical cumulative hazard rate
points(0:2,0:2,col="blue",type="l")

Example output



EstSimPDMP documentation built on May 2, 2019, 3:40 p.m.