View source: R/generateNonHomogeneousExp.R
generateNonHomogeneousExp | R Documentation |
This function generates random variates for a non-homogeneous exponential distribution using a thinning algorithm.
generateNonHomogeneousExp(num_variates, rate_func, start_time, max_time)
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. |
A numeric vector of generated variates.
rate_function_example <- function(t) { 2 * t }
variates <- generateNonHomogeneousExp(5, rate_function_example, 0, 10)
print(variates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.