Package: nhppp 1.0.5

Thomas Trikalinos

nhppp: Simulating Nonhomogeneous Poisson Point Processes

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>).

Authors:Thomas Trikalinos [aut, cre, cph], Yuliia Sereda [aut]

nhppp_1.0.5.tar.gz
nhppp_1.0.5.zip(r-4.7)nhppp_1.0.5.zip(r-4.6)nhppp_1.0.5.zip(r-4.5)
nhppp_1.0.5.tgz(r-4.6-x86_64)nhppp_1.0.5.tgz(r-4.6-arm64)nhppp_1.0.5.tgz(r-4.5-x86_64)nhppp_1.0.5.tgz(r-4.5-arm64)
nhppp_1.0.5.tar.gz(r-4.7-arm64)nhppp_1.0.5.tar.gz(r-4.7-x86_64)nhppp_1.0.5.tar.gz(r-4.6-arm64)nhppp_1.0.5.tar.gz(r-4.6-x86_64)
nhppp_1.0.5.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
nhppp/json (API)
NEWS

# Install 'nhppp' in R:
install.packages('nhppp', repos = c('https://bladder-ca.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/bladder-ca/nhppp/issues

Pkgdown/docs site:https://bladder-ca.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

5.60 score 3 stars 22 scripts 533 downloads 31 exports 5 dependencies

Last updated from:084c6ee75e. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK228
linux-devel-x86_64OK227
source / vignettesOK272
linux-release-arm64OK268
linux-release-x86_64OK222
macos-release-arm64OK199
macos-release-x86_64OK385
macos-oldrel-arm64OK405
macos-oldrel-x86_64OK363
windows-develOK253
windows-releaseOK248
windows-oldrelOK246
wasm-releaseOK128

Exports:drawdraw_cumulative_intensitydraw_intensitydraw_sc_lineardraw_sc_loglineardraw_sc_stepdraw_sc_step_regularget_step_majorizerinverse_with_unirootinverse_with_uniroot_sortedpppppp_exactly_nppp_nppp_next_nppp_orderstatppp_sequentialrng_stream_rexprng_stream_rpoisrng_stream_runifrng_stream_rztpoisrztpoissimpson_num_integrvdrawvdraw_cumulative_intensityvdraw_intensityvdraw_sc_step_regularvdraw_sc_step_regular_cppztdraw_cumulative_intensityztdraw_sc_linearztdraw_sc_loglinearztppp

Dependencies:clilifecycleRcpprlangrstream

A simple discrete event simulation model of a cancer's natural history

Rendered fromSimple_des_model_cancer_natural_Hx.Rmdusingknitr::rmarkdownon May 21 2026.

Last update: 2024-11-08
Started: 2024-10-23

Sampling from Gompertz processes

Rendered fromGompertz_processes.Rmdusingknitr::rmarkdownon May 21 2026.

Last update: 2025-08-20
Started: 2025-08-20

Sampling log-linear times

Rendered fromLog_linear_times.Rmdusingknitr::rmarkdownon May 21 2026.

Last update: 2024-10-23
Started: 2024-10-17

Sampling from Weibull processes

Rendered fromWeibull_processes.Rmdusingknitr::rmarkdownon May 21 2026.

Last update: 2025-08-20
Started: 2025-08-20

Readme and manuals

Help Manual

Help pageTopics
Generic function for simulating from NHPPPs given the intensity function or the cumulative intensity function.draw
Simulate from a non homogeneous Poisson Point Process (NHPPP) over an interval when you know the cumulative intensity and its inverse.draw_cumulative_intensity
Generic function for simulating from NHPPPs given the intensity function.draw_intensity
Special case: Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t_min, t_max) with linear intensity function (inversion method)draw_sc_linear
Special case: Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t_min, t_max) with log-linear intensity function (inversion method)draw_sc_loglinear
Simulate a piecewise constant-rate Poisson Point Process over (t_min, t_max] (inversion method) The intervals need not have the same length.draw_sc_step
Sampling from NHPPPs with piecewise constant intensities with same interval lengths (non-vectorized)draw_sc_step_regular
Piecewise constant (step) majorizer for K-Lipschitz functions over an interval (vectorized over the 'breaks' argument).get_step_majorizer
Simulate a homogeneous Poisson Point Process in (t_min, t_max]ppp
Simulate exactly 'n' points from a homogeneous Poisson Point Process over (t_min, t_max]ppp_exactly_n
Simulate n events from a homogeneous Poisson Point Process.ppp_next_n
Vectorized generic function for simulating from NHPPPs given the intensity function or the cumulative intensity functionvdraw
Vectorized simulation from a non homogeneous Poisson Point Process (NHPPP) from (t_min, t_max) given the cumulative intensity function and its inversevdraw_cumulative_intensity
Vectorized sampling from a non homogeneous Poisson Point Process (NHPPP) from an interval (thinning method) with piecewise constant_majorizers (C++)vdraw_intensity
Vectorized sampling from NHPPPs with piecewise constant intensities with same interval lengthsvdraw_sc_step_regular
Simulate from a zero-truncated non homogeneous Poisson Point Process (zt-NHPPP) from (t_min, t_max) (order statistics method)ztdraw_cumulative_intensity
Simulate 'size' samples from a zero-truncated non homogeneous Poisson Point Process (zt-NHPPP) from (t_min, t_max) with linear intensity functionztdraw_sc_linear
Simulate from a zero-truncated non homogeneous Poisson Point Process (zt-NHPPP) from (t_min, t_max) with a log-linear intensity functionztdraw_sc_loglinear
Simulate a zero-truncated homogeneous Poisson Point Process over (t_min, t_max]ztppp