qpwu: Piecewise uniform distribution: quantile function

qpwuR Documentation

Piecewise uniform distribution: quantile function

Description

This will provide the quantile function of the specified piecewise uniform distribution

Usage

qpwu(p=seq(0,1,by=0.1),u=c(0,5,0.5),ut=c(1,2))

Arguments

p

a vector of probabilities

u

piecewise constant density

ut

time points at which event rate changes. This must be an strictly increasing sequence. ut and u must have the same length.

Details

Let f(t)=\sum_{j=1}^m u_j I(t_{j-1}<t\le t_j) be the density function, where u_1,\ldots,u_m are the corresponding elements of u and t_1,\ldots,t_{m} are the corresponding elements of ut and t_0=0. The distribution function

F(t)=\sum_{j=1}^m u_j(t\wedge t_j-t\wedge t_{j-1}).

User must make sure that \sum_{j=1}^m u_j (t_j-t_{j-1})=1 before using this function.

Value

q

quantiles

Note

This provides the quantile function related to the piecewise uniform distribution

Author(s)

Xiaodong Luo

References

Luo, et al. (2017)

See Also

piecewise uniform

Examples

p<-seq(0,1,by=0.1)
u<-c(0.6,0.4)
ut<-c(1,2)
pwuq<-qpwu(p=p,u=u,ut=ut)
pwuq

PWEALL documentation built on Aug. 9, 2023, 9:08 a.m.

Related to qpwu in PWEALL...