pwe {PWEALL} | R Documentation |
Piecewise exponential distribution: hazard, cumulative hazard, density, distribution, survival
Description
This will provide the related functions of the specified piecewise exponential distribution.
Usage
pwe(t=seq(0,5,by=0.5),rate=c(0,5,0.8),tchange=c(0,3))
Arguments
t |
A vector of time points. |
rate |
A vector of event rates |
tchange |
A strictly increasing sequence of time points at which the event rate changes. The first element of tchange must be zero. It must have the same length as |
Details
Let be the hazard function, where
are the corresponding elements of rate and
are the corresponding elements of tchange,
. The cumulative hazard function
the survival function , the distribution function
and the density function
.
Value
hazard |
Hazard function |
cumhazard |
Cumulative hazard function |
density |
Density function |
dist |
Distribution function |
surv |
Survival function |
Note
Version 1.0 (7/19/2016)
Author(s)
Xiaodong Luo
References
Luo, et al. (2017)
See Also
Examples
t<-seq(0,3,by=0.1)
rate<-c(0.6,0.3)
tchange<-c(0,1.75)
pwefun<-pwe(t=t,rate=rate,tchange=tchange)
pwefun
[Package PWEALL version 1.3.0.1 Index]