Learn R Programming

dbmss (version 2.3-0)

rPopulationIndependenceK: Simulations of a point pattern according to the null hypothesis of population independence defined for K

Description

Simulates of a point pattern according to the null hypothesis of population independence defined for K.

Usage

rPopulationIndependenceK(X, ReferenceType, NeighborType, CheckArguments = TRUE)

Arguments

X
A weighted, marked, planar point pattern (wmppp.object).
ReferenceType
One of the point types.
NeighborType
One of the point types.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time in simulations for example, when the arguments have been checked elsewhere.

Value

A new weighted, marked, planar point pattern (an object of class wmppp, see wmppp.object).

Details

Reference points are kept unchanged, other point positions are shifted by rshift.

References

Goreaud, F. et Pelissier, R. (2003). Avoiding misinterpretation of biotic interactions with the intertype K12 fonction: population independence vs random labelling hypotheses. Journal of Vegetation Science 14(5): 681-692.

See Also

rPopulationIndependenceM, rRandomLabeling

Examples

Run this code

# Simulate a point pattern with two types
X <- rpoispp(50) 
PointType   <- sample(c("A", "B"), X$n, replace=TRUE)
PointWeight <- runif(X$n, min=1, max=10)
X$marks <- data.frame(PointType, PointWeight)
X <- as.wmppp(X)

par(mfrow=c(1,2))
# Plot the point pattern, using PointType as marks
plot(X, main="Original pattern, Point Type", which.marks=2)

# Randomize it
Y <- rPopulationIndependenceK(X, "A", "B")
# Points of type "A" are unchanged, points of type "B" have been moved altogether
plot(Y, main="Randomized pattern, Point Type", which.marks=2)

Run the code above in your browser using DataLab