Learn R Programming

coxsei (version 0.3)

Quant: Quantile function

Description

calculates the value of the quantile function (inverse of the distribution function) of the survival variable with given intensity/hazard function.

Usage

Quant(p, int, tolerance = .Machine$double.eps, ...)

Arguments

p

the (probability) values to calculate the quantiles at

int

the intensity/hazard function. Has to be vectorized.

tolerance

tolerated numerical error in inverting the distribution function.

arguments to be passed to CumInt (eventually to integrate)

Value

a numerical value or vector giving the values of the quantile function at x

Examples

Run this code
# NOT RUN {
curve(Quant(x,int=function(x)3*x^2),from=1e-3,to=1 - 1e-3)
curve(qweibull(x,shape=3),col=3,lty=3,add=TRUE)
# }

Run the code above in your browser using DataLab