Learn R Programming

ldmppr

ldmppr is an R package for working with location dependent marked point processes. The package includes a suite of tools for model estimation, model fit assessment, visualization, and simulation for marked point processes with dependence between the marks and locations and regularity in the pattern.

Workflow Overview

  1. Estimate the parameters of a self-correcting point process given a reference dataset.
  2. Train a mark model using simulated or real-world data.
  3. Check the fit of the model using various non-parametric summaries for point processes and global envelope tests.
  4. Simulate and visualize datasets from the fitted model.

For additional details on implementing the package workflow, run vignette("ldmppr_howto") in R after installing the package.

Installation

You can install the development version of ldmppr from GitHub with:

# install.packages("devtools")
devtools::install_github("lanedrew/ldmppr", build_vignettes = TRUE)

You can install the stable version of ldmppr from CRAN:

install.packages("ldmppr")

For details on how to install the terra package that ldmppr depends on, please visit the terra installation page.

Copy Link

Version

Install

install.packages('ldmppr')

Monthly Downloads

570

Version

1.1.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Lane Drew

Last Published

March 1st, 2026

Functions in ldmppr (1.1.2)

ldmppr-package

ldmppr: Estimate and Simulate from Location Dependent Marked Point Processes
ldmppr_sim

Simulated marked point process object
ldmppr_model_check

Model fit diagnostic object
sim_spatial_sc

Simulate the spatial component of the self-correcting model (faster)
ldmppr_grids

Create a grid schedule for estimate_process_parameters()
vec_dist

calculates euclidean distance
vec_to_mat_dist

calculates euclidean distance between a vector and a matrix
sim_temporal_sc

Simulate the temporal component of the self-correcting model
extract_covars

Extract covariate values from a set of rasters
ldmppr_budgets-class

Optimization budget specification object
ldmppr_budgets

Create an optimization budget specification for estimate_process_parameters()
full_product

calculates full product for one grid point
part_2_full

calculates part 2 of the likelihood
%>%

Pipe operator
ldmppr_grids-class

Grid schedule object
ldmppr_fit

Fitted point-process model object
part_1_4_full

calculates part 1-4
ldmppr_mark_model

Mark model object
toroidal_dist_matrix_optimized

Optimized function to compute toroidal distance matrix over a rectangular domain
part_1_2_full

calculates part 1-2 full
simulate_sc

Simulate from the self-correcting model
part_1_3_full

calculates part 1-3
predict_marks

Predict values from the mark distribution
scale_rasters

Scale a set of rasters
train_mark_model

Train a flexible model for the mark distribution
simulate_mpp

Simulate a realization of a location dependent marked point process
temporal_sc

calculates temporal likelihood
part_1_full

calculates part 1 of the likelihood
plot_mpp

Plot a marked point process
thin_st_fast

calculates acceptance for thinning mechanism during simulation
power_law_mapping

Gentle decay (power-law) mapping function from sizes to arrival times
dist_one_dim

calculates distance in one dim
estimate_process_parameters

Estimate point process parameters using log-likelihood maximization
medium_example_data

Medium Example Data
small_example_data

Small Example Data
spat_interaction

calculates spatial interaction
part_1_1_full

calculates part 1-1 full
conditional_sum

calculates sum of values < t
check_model_fit

Check the fit of an estimated model using global envelope tests
generate_mpp

Generate a marked process given locations and marks
full_sc_lhood_fast

Evaluate optimized self-correcting log-likelihood
conditional_sum_logical

calculates sum of values < t
ldmppr-internal

Internal helpers (not part of the public API)
full_sc_lhood

Evaluate reference self-correcting log-likelihood
C_theta2_i

calculates c_theta
interaction_st_fast

Fast spatio-temporal interaction for the self-correcting model