Package: nhppp 1.0.1.9000

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.1.9000.tar.gz
nhppp_1.0.1.9000.zip(r-4.5)nhppp_1.0.1.9000.zip(r-4.4)nhppp_1.0.1.9000.zip(r-4.3)
nhppp_1.0.1.9000.tgz(r-4.5-x86_64)nhppp_1.0.1.9000.tgz(r-4.5-arm64)nhppp_1.0.1.9000.tgz(r-4.4-x86_64)nhppp_1.0.1.9000.tgz(r-4.4-arm64)nhppp_1.0.1.9000.tgz(r-4.3-x86_64)nhppp_1.0.1.9000.tgz(r-4.3-arm64)
nhppp_1.0.1.9000.tar.gz(r-4.5-noble)nhppp_1.0.1.9000.tar.gz(r-4.4-noble)
nhppp_1.0.1.9000.tgz(r-4.4-emscripten)nhppp_1.0.1.9000.tgz(r-4.3-emscripten)
nhppp.pdf |nhppp.html
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 site:https://bladder-ca.github.io

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

On CRAN:

cpp

5.76 score 3 stars 19 scripts 415 downloads 31 exports 6 dependencies

Last updated 1 months agofrom:63f8be7e55. Checks:11 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 08 2025
R-4.5-win-x86_64OKFeb 08 2025
R-4.5-mac-x86_64OKFeb 08 2025
R-4.5-mac-aarch64OKFeb 08 2025
R-4.5-linux-x86_64OKFeb 08 2025
R-4.4-win-x86_64OKFeb 08 2025
R-4.4-mac-x86_64OKFeb 08 2025
R-4.4-mac-aarch64OKFeb 08 2025
R-4.3-win-x86_64OKFeb 08 2025
R-4.3-mac-x86_64OKFeb 08 2025
R-4.3-mac-aarch64OKFeb 08 2025

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:cligluelifecycleRcpprlangrstream

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

Rendered fromSimple_des_model_cancer_natural_Hx.Rmdusingknitr::rmarkdownon Feb 08 2025.

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

Sampling log-linear times

Rendered fromLog_linear_times.Rmdusingknitr::rmarkdownon Feb 08 2025.

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

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