fGTDL {GTDL}R Documentation

The GTDL distribution

Description

Density function, survival function, failure function and random generation for the GTDL distribution.

Usage

dGTDL(t, param, log = FALSE)

hGTDL(t, param)

sGTDL(t, param)

rGTDL(n, param)

Arguments

t

vector of integer positive quantile.

param

parameters (alpha and gamma are scalars, lambda non-negative).

log

logical; if TRUE, probabilities p are given as log(p).

n

number of observations.

Details

Value

dGTDL gives the density function, hGTDL gives the failure function, sGTDL gives the survival function and rGTDL generates random samples.

Invalid arguments will return an error message.

Source

[d-p-q-r]GTDL are calculated directly from the definitions.

References

Examples


library(GTDL)
t <- seq(0,20,by = 0.1)
lambda <- 1.00
alpha <- -0.05
gamma <- -1.00
param <- c(lambda,alpha,gamma)
y1 <- hGTDL(t,param)
y2 <- sGTDL(t,param)
y3 <- dGTDL(t,param,log = FALSE)
tt <- as.matrix(cbind(t,t,t))
yy <- as.matrix(cbind(y1,y2,y3))
matplot(tt,yy,type="l",xlab="time",ylab="",lty = 1:3,col=1:3,lwd=2)


y1 <- hGTDL(t,c(1,0.5,-1.0))
y2 <- hGTDL(t,c(1,0.25,-1.0))
y3 <- hGTDL(t,c(1,-0.25,1.0))
y4 <- hGTDL(t,c(1,-0.50,1.0))
y5 <- hGTDL(t,c(1,-0.06,-1.6))
tt <- as.matrix(cbind(t,t,t,t,t))
yy <- as.matrix(cbind(y1,y2,y3,y4,y5))
matplot(tt,yy,type="l",xlab="time",ylab="Hazard function",lty = 1:3,col=1:3,lwd=2)




[Package GTDL version 1.0.0 Index]