dpch {miniPCH} | R Documentation |
Survival Distributions with piece-wise Constant Hazards
Description
Densitiy, distribution function, quantiles, random numbers, hazard function, cumulative hazard function and survival function of survival distributions with piece-wise constant hazards (picewise exponential distributions).
Usage
dpch(x, t, lambda)
ppch(q, t, lambda)
qpch(p, t, lambda)
rpch(n, t, lambda, discrete = FALSE)
hpch(x, t, lambda)
chpch(x, t, lambda)
spch(q, t, lambda)
Arguments
x |
vector of quantiles |
t |
vector of left interval borders |
lambda |
vector of hazards |
q |
vector of quantiles |
p |
vector of probabilities |
n |
number of random numbers |
discrete |
round survival times to whole numbers |
Value
dpch
gives the density evaluated at x
.
ppch
gives the distribution function evaluated at q
.
qpch
gives the p
-quantiles.
rpch
gives n
random numbers.
hpch
gives the hazard function evaluated at x
.
chpch
gives the cumulative hazard function evaluated at x
.
spch
gives the survival function evaluated at q
.
Functions
-
dpch()
: density of survival distributions with piece-wise constant hazards -
ppch()
: distribution function of survival distributions with piece-wise constant hazards -
qpch()
: quantiles of survival distributions with piece-wise constant hazards -
rpch()
: random samples of survival distributions with piece-wise constant hazards -
hpch()
: hazard of survival distributions with piece-wise constant hazards -
chpch()
: cumulative hazard of survival distributions with piece-wise constant hazards -
spch()
: survival function of survival distributions with piece-wise constant hazards
Examples
dpch(1:10, c(0, 3), c(2, 0.1))
ppch(1:10, c(0, 3), c(2, 0.1))
qpch(seq(0,1, by=0.1), c(0, 3), c(2, 0.1))
rpch(15, c(0, 3), c(2, 0.1))
rpch(15, c(0, 3), c(2, 0.1), discrete=TRUE)
hpch(1:10, c(0, 3), c(2, 0.1))
chpch(1:10, c(0, 3), c(2, 0.1))
ppch(1:10, c(0, 3), c(2, 0.1))