hazard {ftaproxim}R Documentation

Hazard Rate Function

Description

For a given vector of times and a probability distribution function, this function calculates the hazard rate values.

Usage

hazard(t, D, P, ...)

Arguments

t

a numeric value as time

D

a density function

P

a cumulative density function

...

More parameters

Details

Hazard rate functions defined as the ratio of the density function and the survival function. That is:

Value

A numeric vector of hazard rate values.

Examples

## Standard normal distribution
t <- c(0.1, 0.01)
P <- pnorm
D <- dnorm
hazard(t, D, P)

## Uniform distribution with min=2.0 and max=2.5
t <- 2.2
P <- punif
D <- dunif
hazard(t, D, P, 2.0, 2.5)

[Package ftaproxim version 0.0.1 Index]