Package: nhppp 1.0.0

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>). 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.0.tar.gz
nhppp_1.0.0.tar.gz(r-4.5-noble)nhppp_1.0.0.tar.gz(r-4.4-noble)
nhppp_1.0.0.tgz(r-4.4-emscripten)nhppp_1.0.0.tgz(r-4.3-emscripten)
nhppp.pdf |nhppp.html
nhppp/json (API)
NEWS

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

Peer review:

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

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

    3.48 score 8 scripts 549 downloads 31 exports 6 dependencies

    Last updated 7 days agofrom:b779277213. Checks:OK: 2. Indexed: no.

    TargetResultDate
    Doc / VignettesOKOct 24 2024
    R-4.5-linux-x86_64OKOct 24 2024

    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 Oct 24 2024.

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

    Sampling log-linear times

    Rendered fromLog_linear_times.Rmdusingknitr::rmarkdownon Oct 24 2024.

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

    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