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

507

Version

1.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Lane Drew

Last Published

January 8th, 2026

Functions in ldmppr (1.1.0)

ldmppr-package

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

Predict values from the mark distribution
temporal_sc

calculates temporal likelihood
plot_mpp

Plot a marked point process
power_law_mapping

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

Simulate a realization of a location dependent marked point process
simulate_sc

Simulate from the self-correcting model
vec_to_mat_dist

calculates euclidean distance between a vector and a matrix
part_1_4_full

calculates part 1-4
part_1_full

calculates part 1 of the likelihood
toroidal_dist_matrix_optimized

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

calculates part 1-2 full
part_1_1_full

calculates part 1-1 full
small_example_data

Small Example Data
part_1_3_full

calculates part 1-3
train_mark_model

Train a flexible model for the mark distribution
vec_dist

calculates euclidean distance
scale_rasters

Scale a set of rasters
%>%

Pipe operator
spat_interaction

calculates spatial interaction
sim_temporal_sc

Simulate the temporal component of the self-correcting model
sim_spatial_sc

Simulate the spatial component of the self-correcting model
full_sc_lhood_fast

calculates fast full self-correcting log-likelihood
estimate_process_parameters

Estimate point process parameters using log-likelihood maximization
ldmppr_mark_model

Mark model object
dist_one_dim

calculates distance in one dim
conditional_sum

calculates sum of values < t
extract_covars

Extract covariate values from a set of rasters
check_model_fit

Check the fit of estimated self-correcting model on the reference point pattern dataset
C_theta2_i

calculates c_theta
conditional_sum_logical

calculates sum of values < t
full_product

calculates full product for one grid point
ldmppr_fit

Fitted point-process model object
ldmppr_model_check

Model fit diagnostic object
ldmppr_sim

Simulated marked point process object
full_sc_lhood

calculates full self-correcting log-likelihood
ldmppr-internal

Internal helpers (not part of the public API)
generate_mpp

Generate a marked process given locations and marks
interaction_st

calculates spatio-temporal interaction
part_2_full

calculates part 2 of the likelihood
medium_example_data

Medium Example Data