Learn R Programming

EstSimPDMP (version 1.2)

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

Description

This function computes simulations of random variables from their conditional hazard rate function.

Usage

Simu.Cond.HR(N,lambda,x,verbose)

Arguments

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

See Also

Simu.HR

Examples

Run this code
# Simu.Cond.HR
example<-function(x,t){
	sqrt(sum(x^2))+t
}

# Simulations of 50 iid random variables with hazard rate=example given x=3
Simu.Cond.HR(50,example,3)

# Simulations of 50 iid random variables with hazard rate=example given x=0.5
# Simu.Cond.HR(50,example,0.5)

Run the code above in your browser using DataLab