rpch: Generate sample from the piecewise constant hazard model

Description Usage Arguments Value Examples

Description

Generate sample from the piecewise constant hazard model

Usage

1
rpch(n, cuts, alpha)

Arguments

n

sample size

cuts

cuts defining the intervals in the piecewise constant hazard model

alpha

values of the hazard (over each interval) in the piecewise constant hazard model

Value

a matrix of dimension K * J

Examples

1
2
3
4
5
## Not run: 
data <- rpch(1000, 1, c(0.2, 0.9))
plot(ecdf(data))

## End(Not run)

goepp/hazreg documentation built on June 7, 2019, 4:03 a.m.