Last data update: 2014.03.03

R: Alternative hazard rate function
ahrdiweibullR Documentation

Alternative hazard rate function

Description

Alternative hazard rate function for the discrete inverse Weibull distribution

Usage

ahrdiweibull(x, q, beta)

Arguments

x

a vector of values

q

the value of the q parameter

beta

the value of the β parameter

Details

The alternative hazard rate function is defined as h(x)=log(P(X>x-1)/P(X>x))=log[(1-q^{(x-1)^{-β}})/(1-q^{x^{-β}})]

Value

the value of the alternative hazard rate function in the x values

See Also

hrdiweibull

Examples

q<-0.5
beta<-2
x<-1:10
y<-ahrdiweibull(x, q, beta)
y
plot(x,y,ylab="alt.hazard rate")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DiscreteInverseWeibull)
Loading required package: Rsolnp
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DiscreteInverseWeibull/ahrdiweibull.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ahrdiweibull
> ### Title: Alternative hazard rate function
> ### Aliases: ahrdiweibull
> ### Keywords: distribution
> 
> ### ** Examples
> 
> q<-0.5
> beta<-2
> x<-1:10
> y<-ahrdiweibull(x, q, beta)
> y
 [1] 0.6931472 1.1450526 0.7637987 0.5586858 0.4385354 0.3604238 0.3057544
 [8] 0.2654085 0.2344314 0.2099091
> plot(x,y,ylab="alt.hazard rate")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>