Learn R Programming

dbmss (version 1.2.4)

DEnvelope: Estimation of the confidence envelope of the D function under its null hypothesis

Description

Simulates point patterns according to the null hypothesis and returns the envelope of D according to the confidence level.

Usage

DEnvelope(NumberOfSimulations, Alpha, X, r, Cases, Controls, Intertype = FALSE)

Arguments

NumberOfSimulations
The number of simulations to run.
Alpha
The risk level.
X
A point pattern (ppp.object), marks must be a dataframe with two columns: PointType: labels, as factors. PointWeight: weights.
r
A vector of distances.
Cases
One of the point types
Controls
One of the point types.
Intertype
Logical; if TRUE, D is computed as Di in Marcon and Puech (2012).

Value

  • A list:
  • SimulationsA matrix containing the simulated values (each line is a simulation, each column a value of D(R)
  • MinA vector: the lower bound of the envelope
  • MaxA vector: the upper bound of the envelope

Details

This envelope is local, that is to say it is computed separately at each distance. See Loosmore and Ford (2006) for a discussion.

References

Kenkel, N. C. (1988). Pattern of Self-Thinning in Jack Pine: Testing the Random Mortality Hypothesis. Ecology 69(4): 1017-1024. Loosmore, N. B. and Ford, E. D. (2006). Statistical inference using the G or K point pattern spatial statistics. Ecology 87(8): 1925-1931. Marcon, E. and F. Puech (2012). A typology of distance-based measures of spatial concentration. HAL SHS. 00679993.

See Also

Kd.r

Examples

Run this code
data(paracou16)
# Keep only 20% of points to run this example
X <- rthin(paracou16, 0.2)
plot(X)

# Calculate K
r <- 0:30
ActualValues.X <- D.r(X, r, "V. Americana", "Q. Rosea", Intertype = TRUE)

# Calculate confidence envelope (should be 1000 simulations, reduced to 20 to save time)
NumberOfSimulations <- 20
Alpha <- .05
LocalEnvelope.X <- DEnvelope(NumberOfSimulations, Alpha, X, r, 
    "V. Americana", "Q. Rosea", Intertype = TRUE)

# Plot
PlotResults(r, DivideByPiR2(ActualValues.X, r), lapply(LocalEnvelope.X, DivideByPiR2, r), 
    ylab="D / (pi R^2)", ReferenceValue=0)

Run the code above in your browser using DataLab