Learn R Programming

dbmss (version 1.2.4)

MEnvelope: Estimation of the confidence envelope of the M function under its null hypothesis

Description

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

Usage

MEnvelope(NumberOfSimulations, Alpha = .05, X, r, ReferenceType, NeighborType, 
      SimulationType = "RandomLocation", CaseControl = FALSE)

Arguments

NumberOfSimulations
The number of simulations to draw.
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.
ReferenceType
One of the point types.
NeighborType
One of the point types.
CaseControl
Logical; if TRUE, the case-control version of M is computed. ReferenceType points are cases, NeighborType points are controls.
SimulationType
A string describing the null hypothesis to simulate. The null hypothesis may be "RandomLocation": points are redistributed accross actual locations; "RandomLabeling": randomizes point types, keeping locations unchanged; "PopulationIn

Value

  • A list:
  • SimulationsA matrix containing the simulated values (each line is a simulation, each column a value of M(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.

See Also

M.r

Examples

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

# Calculate M
r <- seq(0, 30, 2)
ActualValues.X <- M.r(X, r, "V. Americana", "Q. Rosea")

# Calculate confidence envelope (should be 1000 simulations, reduced to 4 to save time)
NumberOfSimulations <- 4
Alpha <- .10
LocalEnvelope.X <- MEnvelope(NumberOfSimulations, Alpha, X, r, 
    "V. Americana", "Q. Rosea", "RandomLabeling")

# Plot
PlotResults(r, ActualValues.X, LocalEnvelope.X, ylab="M", ReferenceValue=1)

Run the code above in your browser using DataLab