simulate_antecedent_conditions: simulate_antecedent_conditions

View source: R/simulate_antecedent_conditions.R

simulate_antecedent_conditionsR Documentation

simulate_antecedent_conditions

Description

Simulate heterogenous pattern

Usage

simulate_antecedent_conditions(x, i, j, nsim, heterogenous = FALSE, ...)

Arguments

x

ppp

i

Mark of points that are randomized.

j

Mark of points that do not change.

nsim

Number of patterns to simulate.

heterogenous

If TRUE, points with the mark i are randomized using a heterogeneous Poisson process.

...

Arguments passed to spatstat.explore::density.ppp().

Details

Simulate point patterns as null model data for spatstat.explore::envelope() using antecedent conditions as null model. x must be marked point pattern. Antecedent conditions are suitable as a null model if points of type j may influence points of type i, but not the other way around (Velazquez et al 2016). One example are the positions of seedlings that may be influenced by the position of mature trees.

Returns a list with ppp objects.

Value

list

References

Velázquez, E., Martínez, I., Getzin, S., Moloney, K.A., Wiegand, T., 2016. An evaluation of the state of spatial point pattern analysis in ecology. Ecography 39, 1–14. <https://doi.org/10.1111/ecog.01579>

Wiegand, T., Moloney, K.A., 2014. Handbook of spatial point-pattern analysis in ecology. Chapman and Hall/CRC Press, Boca Raton, USA. <isbn:978-1-4200-8254-8>

See Also

envelope

Examples

set.seed(42)
pattern_a <- spatstat.random::runifpoint(n = 20)
spatstat.geom::marks(pattern_a) <- "a"
pattern_b <- spatstat.random::runifpoint(n = 100)
spatstat.geom::marks(pattern_b) <- "b"
pattern <- spatstat.geom::superimpose(pattern_a, pattern_b)

null_model <- simulate_antecedent_conditions(x = pattern, i = "b", j = "a", nsim = 19)
spatstat.explore::envelope(Y = pattern, fun = spatstat.explore::pcf,
nsim = 19, simulate = null_model)


onpoint documentation built on Nov. 16, 2022, 1:08 a.m.