Learn R Programming

EstSimPDMP (version 1.2)

Simu.HR: Simulation of random variables from their hazard rate function

Description

This function computes simulations of random variables from their chazard rate function.

Usage

Simu.HR(N,lambda,verbose)

Arguments

N
number of simulations.
lambda
hazard rate function (can be computed in a vector of times).
verbose
if TRUE, add a histogram of the simulations.

See Also

Simu.Cond.HR

Examples

Run this code
# Simu.HR

# Weibull distribution hazard rate function
example<-function(x){
	x
}
# Simulation of 50 iid random variables with hazard rate=example
Simu.HR(50,example)

Run the code above in your browser using DataLab