pwe | R Documentation |
This will provide the related functions of the specified piecewise exponential distribution.
pwe(t=seq(0,5,by=0.5),rate=c(0,5,0.8),tchange=c(0,3))
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 |
Let λ(t)=∑_{j=1}^m λ_j I(t_{j-1}≤ t<t_j) be the hazard function, where λ_1,…,λ_m are the corresponding elements of rate and t_0,…,t_{m-1} are the corresponding elements of tchange, t_m=∞. The cumulative hazard function
Λ(t)=∑_{j=1}^m λ_j(t\wedge t_j-t\wedge t_{j-1}),
the survival function S(t)=\exp\{-Λ(t)\}, the distribution function F(t)=1-S(t) and the density function f(t)=λ(t)S(t).
hazard |
Hazard function |
cumhazard |
Cumulative hazard function |
density |
Density function |
dist |
Distribution function |
surv |
Survival function |
Version 1.0 (7/19/2016)
Xiaodong Luo
Luo, et al. (2017)
rpwe
,qpwe
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.