generateNonHomogeneousExp: Generate Variates for a Non-Homogeneous Exponential Process

View source: R/generateNonHomogeneousExp.R

generateNonHomogeneousExpR Documentation

Generate Variates for a Non-Homogeneous Exponential Process

Description

This function generates random variates for a non-homogeneous exponential distribution using a thinning algorithm.

Usage

generateNonHomogeneousExp(num_variates, rate_func, start_time, max_time)

Arguments

num_variates

The number of variates to generate.

rate_func

A function representing the rate of the non-homogeneous process.

start_time

The start time for the generation of variates.

max_time

The maximum time limit for the generation of variates.

Value

A numeric vector of generated variates.

Examples

rate_function_example <- function(t) { 2 * t }
variates <- generateNonHomogeneousExp(5, rate_function_example, 0, 10)
print(variates)

franciscorichter/emphasis documentation built on Feb. 19, 2024, 7:36 p.m.