nhppp1.0.2 package

Simulating Nonhomogeneous Poisson Point Processes

check_ppp_sample_validity

Check the validity of ppp samples arranged in matrix format

check_ppp_vector_validity

Check the validity of a ppp vector.

compare_ppp_vectors

Check that two ppp vectors Q-Q agree

draw_cumulative_intensity_inversion

Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t_...

draw_cumulative_intensity_orderstats

Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t_...

draw_cumulative_intensity

Simulate from a non homogeneous Poisson Point Process (NHPPP) over an ...

draw_intensity_line

Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t0...

draw_intensity_step

Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t0...

draw_intensity

Generic function for simulating from NHPPPs given the intensity functi...

draw_sc_linear

Special case: Simulate from a non homogeneous Poisson Point Process (N...

draw_sc_loglinear

Special case: Simulate from a non homogeneous Poisson Point Process (N...

draw_sc_step_regular

Sampling from NHPPPs with piecewise constant intensities with same int...

draw_sc_step

Simulate a piecewise constant-rate Poisson Point Process over `(t_min,...

draw

Generic function for simulating from NHPPPs given the intensity functi...

expect_no_error

Helper functions

get_step_majorizer

Piecewise constant (step) majorizer for K-Lipschitz functions over an ...

inverse_with_uniroot_sorted

Numerically evaluate the inverse of a monotonically increasing continu...

inverse_with_uniroot

Numerically evaluate the inverse of a function at a specific point

Lambda_exp_form

Definite integral of l = exp(intercept + slope*t) at time twith `L...

Lambda_inv_exp_form

Inverse of the definite integral of l = exp(intercept + slope*t) at ...

Lambda_inv_linear_form

Inverse of the definite integral of l = intercept + slope*t at time ...

Lambda_linear_form

Definite integral of l = intercept + slope*t at time twith `L(t0) ...

make_cumulative_Lambda_matrix

Helper function for the vectorized versions of sampling functions. Tak...

make_lambda_matrix

Helper function for the vectorized versions of sampling functions. Tak...

make_range_t_matrix

Helper function for the vectorized versions of sampling functions. Tak...

mat_cumsum_columns_with_scalar_ceiling

Return matrix with column-wise cumulative sum replacing cells larger t...

mat_cumsum_columns_with_vector_ceiling

Return matrix with column-wise cumulative sum replacing cells larger t...

mat_cumsum_columns

Return matrix with column-wise cumulative sum No checks for arguments ...

mat_diff_columns

Return matrix with column-wise differencing. No checks for arguments i...

matrix_cumsum_columns_inplace

Usage: matrix_cumsum_columns_inplace( X )

matrix_cumsum_columns

Usage: matrix_cumsum_columns( X )

matrix_diff_columns_inplace

Usage: matrix_diff_columns_inplace( X )

matrix_diff_columns

Usage: matrix_diff_columns( X )

nhppp-package

nhppp: Simulating Nonhomogeneous Poisson Point Processes

ppp_exactly_n

Simulate exactly n points from a homogeneous Poisson Point Process o...

ppp_n

Simulate specific number of points from a homogeneous Poisson Point Pr...

ppp_next_n

Simulate n events from a homogeneous Poisson Point Process.

ppp_orderstat

Simulate a homogeneous Poisson Point Process over (t_min, t_max] (orde...

ppp_sequential

Simulate a homogeneous Poisson Point Process over (t_min, t_max]

ppp

Simulate a homogeneous Poisson Point Process in (t_min, t_max]

ppp2

Simulate a homogeneous Poisson Point Process over (t_min, t_max] (orde...

read_code

Read code from text file as string

rng_stream_rexp

Exponential random samples from rstream objects

rng_stream_rpois

Poisson random samples from rstream objects

rng_stream_runif

Uniform random samples from rstream objects

rng_stream_rztpois

Zero-truncated Poisson random samples from rstream objects

rztpois

Zero-truncated Poisson random samples (basic R)

simpson_num_integr

Simpson's method to integrate a univariate function.

vdraw_cumulative_intensity

Vectorized simulation from a non homogeneous Poisson Point Process (NH...

vdraw_intensity_step_regular_cpp

Vectorized sampling from a non homogeneous Poisson Point Process (NHPP...

vdraw_intensity_step_regular_forcezt

Vectorized sampling from a non homogeneous Poisson Point Process (NHPP...

vdraw_intensity

Vectorized sampling from a non homogeneous Poisson Point Process (NHPP...

vdraw_sc_step_regular_cpp

Vectorized sampling from NHPPPs with piecewise constant intensities wi...

vdraw_sc_step_regular

Vectorized sampling from NHPPPs with piecewise constant intensities wi...

vdraw

Vectorized generic function for simulating from NHPPPs given the inten...

vztdraw_intensity_step_regular

Vectorized sampling from a zero-truncated non homogeneous Poisson Poin...

vztdraw_intensity

Vectorized sampling from a zero-truncated non homogeneous Poisson Poin...

vztdraw_sc_step_regular_cpp

Vectorized sampling from zero-truncated NHPPPs with piecewise constant...

ztdraw_cumulative_intensity

Simulate from a zero-truncated non homogeneous Poisson Point Process (...

ztdraw_intensity_line

Simulate size samples from a zero-truncated non homogeneous Poisson ...

ztdraw_intensity_step

Simulate from a zero-truncated non homogeneous Poisson Point Process (...

ztdraw_intensity

Generic function for simulating from zero-truncated NHPPPs given the i...

ztdraw_sc_linear

Simulate size samples from a zero-truncated non homogeneous Poisson ...

ztdraw_sc_loglinear

Simulate from a zero-truncated non homogeneous Poisson Point Process (...

ztppp

Simulate a zero-truncated homogeneous Poisson Point Process over (t_mi...

Simulates events from one dimensional nonhomogeneous Poisson point processes (NHPPPs) as per Trikalinos and Sereda (2024, <doi:10.48550/arXiv.2402.00358> and 2024, <doi:10.1371/journal.pone.0311311>). Functions are based on three algorithms that provably sample from a target NHPPP: the time-transformation of a homogeneous Poisson process (of intensity one) via the inverse of the integrated intensity function (Cinlar E, "Theory of stochastic processes" (1975, ISBN:0486497996)); the generation of a Poisson number of order statistics from a fixed density function; and the thinning of a majorizing NHPPP via an acceptance-rejection scheme (Lewis PAW, Shedler, GS (1979) <doi:10.1002/nav.3800260304>).

  • Maintainer: Thomas Trikalinos
  • License: GPL (>= 3)
  • Last published: 2025-01-09