Skip to contents

Implements a generic two-mark planar determinantal point process model. It is possible to set its parameters, fit the model to an observed planar point pattern or simulate a planar point pattern.

Active bindings

first_intensity

Setter and getter for the first intensity \(\rho_1\).

second_intensity

Setter and getter for the second intensity \(\rho_2\).

first_repulsion_rate

Setter and getter for the first repulsion rate \(\alpha_1\).

second_repulsion_rate

Setter and getter for the second repulsion rate \(\alpha_2\).

cross_repulsion_rate

Setter and getter for the cross repulsion rate \(\alpha_{12}\).

between_mark_correlation

Setter and getter for the correlation \(\tau\) between marks.

window_size

Setter and getter for the window size \(L\).

Methods


Method new()

The TwoMarkDPP constructor.

Usage

Arguments

model

A string specifying the underlying parametric model to be used. Choices are "Gauss" or "Bessel". Defaults to "Gauss".

Returns

The TwoMarkDPP object invisibly.

Examples

mod <- TwoMarkDPP$new(model = "Gauss")


Method fit()

Estimates the parameters of the two-mark DPP from an observed planar point pattern.

Usage

TwoMarkDPP$fit(X, method = c("pcf", "mle"))

Arguments

X

An object of class spatstat.geom::ppp.

method

A string specifying the kind of estimator to use. Choices are either "pcf" or "mle". Defaults to "pcf".

Returns

The TwoMarkDPP object invisibly.

Examples

mod <- TwoMarkDPP$new(model = "Gauss")
mod$fit(sim_gauss0[[1]])


Method random()

Samples one or more planar point patterns according to the two-mark DPP.

Usage

TwoMarkDPP$random(n)

Arguments

n

An integer value specifying the sample size.

Returns

A base::list of objects of class spatstat.geom::ppp storing sampled planar point patterns.

Examples

mod <- TwoMarkDPP$new(model = "Gauss")
mod$fit(sim_gauss0[[1]])
mod$random(n = 1)


Method print()

Prints the TwoMarkDPP object.

Usage

TwoMarkDPP$print(...)

Arguments

...

Extra parameters to be passed on to next methods. Current unused.

Returns

NULL

Examples

mod <- TwoMarkDPP$new()
mod


Method clone()

The objects of this class are cloneable with this method.

Usage

TwoMarkDPP$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `TwoMarkDPP$new`
## ------------------------------------------------

mod <- TwoMarkDPP$new(model = "Gauss")

## ------------------------------------------------
## Method `TwoMarkDPP$fit`
## ------------------------------------------------

mod <- TwoMarkDPP$new(model = "Gauss")
mod$fit(sim_gauss0[[1]])

## ------------------------------------------------
## Method `TwoMarkDPP$random`
## ------------------------------------------------

mod <- TwoMarkDPP$new(model = "Gauss")
mod$fit(sim_gauss0[[1]])
mod$random(n = 1)
#> [[1]]
#> Marked planar point pattern: 208 points
#> Multitype, with levels = 1, 2 
#> window: rectangle = [0, 1] x [0, 1] units
#> 

## ------------------------------------------------
## Method `TwoMarkDPP$print`
## ------------------------------------------------

mod <- TwoMarkDPP$new()
mod
#> 
#> ── Two-mark planar Gauss determinantal point process ───────────────────────────
#>  Intensity of the 1st marginal DPP: ?
#>  Intensity of the 2nd marginal DPP: ?
#>  Repulsion rate of the 1st marginal DPP: ?
#>  Repulsion rate of the 2nd marginal DPP: ?
#>  Repulsion rate between marks: ?
#>  Correlation between marks: ?
#>  Window size: ?