Density, distribution function, quantile function, hazard function, cumulative hazard function, mean, and random generation for the Piecewice Constant Hazards (pch) distribution.
ppch(q, cuts, levels, lower.tail = TRUE, log.p = FALSE)
dpch(x, cuts, levels, log = FALSE)
hpch(x, cuts, levels, log = FALSE)
Hpch(x, cuts, levels, log.p = FALSE)
qpch(p, cuts, levels, lower.tail = TRUE, log.p = FALSE)
mpch(cuts, levels)
rpch(n, cuts, levels)dpch gives the density,
ppch gives the distribution function,
qpch gives the quantile function,
hpch gives the hazard function,
Hpch gives the cumulative hazard function,
mpch gives the mean, and
rpch generates random deviates.
Vector of cut points defining the intervals where the hazard function is constant.
Vector of levels (values of the hazard function).
logical; if TRUE (default), probabilities are \(P(X \le x)\), otherwise, \(P(X > x)\).
vector of quantiles.
vector of probabilities.
logical; if TRUE, probabilities p are given as log(p).
number of observations. If length(n) > 1, the length is taken
to be the number required.
The pch distribution has a hazard function that is piecewise constant
on intervals defined by cutpoints
$$0 < c_1 < \cdots < c_n < \infty, n \ge 0$$
If n = 0, this reduces to an exponential distribution.