Learn R Programming

TBSSurvival (version 1.3)

tbs: The TBS Time Failure Distribution

Description

Density function, distribution function, quantile function, random generation function and hazard function for the Transform-Both-Sides (TBS) model.

Usage

dtbs(time,lambda=1,xi=1,beta=1,x=NULL,dist=dist.error("norm")) ptbs(time,lambda=1,xi=1,beta=1,x=NULL,dist=dist.error("norm")) qtbs(p,lambda=1,xi=1,beta=1,x=NULL,dist=dist.error("norm")) rtbs(n,lambda=1,xi=1,beta=1,x=NULL,dist=dist.error("norm")) htbs(time,lambda=1,xi=1,beta=1,x=NULL,dist=dist.error("norm"))

Arguments

time
vector of quantiles.
p
vector of probabilities.
n
number of observations.
lambda
parameter of TBS.
xi
parameter of the error distribution.
beta
parameter of the linear regressor.
x
vector/matrix of co-variables, x=NULL if there are not co-variables.
dist
Distribution of error, it can be string such as dist = "norm", "t", "doubexp", "cauchy" or "logistic, or it can also be given as a list of functions (density, distribution, quantile, random generation, name). Details below.

Value

`dtbs' gives the density, `ptbs' gives the distribution function, `qtbs' gives the quantile function, `rtbs' generates random deviates, `htbs' gives the hazard function.

Details

The density function, distribution function, quantile function, random generation and hazard function for the failure time of a TBS Model. The distribution of error can be chosen from Normal, t-Student, Cauchy, Logistic and Doub-Exponential (Laplace), or can be given by the user (as long as it is zero-centered, unimodal and symmetric -- TBS does not check it). See the help of dist.error for examples.

See Also

dist.error

Examples

Run this code
  ptbs(1,lambda=2,xi=1,beta=1,dist=dist.error("norm"))

Run the code above in your browser using DataLab