mEnvelope(X, r = NULL, NumberOfSimulations = 100, Alpha = 0.05, ReferenceType, NeighborType = ReferenceType, CaseControl = FALSE, Original = TRUE, Approximate = ifelse(X$n < 10000, 0, 1), Adjust = 1, MaxRange = "ThirdW", SimulationType = "RandomLocation", Global = FALSE)
wmppp.object
).
NULL
, a default value is set: 512 equally spaced values are used up to the median distance between points (following Duranton and Overman, 2005).
TRUE
, the case-control version of M is computed. ReferenceType points are cases, NeighborType points are controls.
TRUE
(by default), the original bandwidth selection by Duranton and Overman (2005) following Silverman (1986: eq 3.31) is used. If FALSE
, it is calculated following Sheather and Jones (1991), i.e. the state of the art. See bw.SJ
for more details.
Approximate
single values equally spaced between 0 and the largest distance. This technique (Scholl and Brenner, 2015) allows saving a lot of memory when addressing large point sets (the default value is 1 over 10000 points). Increasing Approximate
allows better precision at the cost of proportional memory use.
Original
) to be multiplied by Adjust
. Setting it to values lower than one (1/2 for example) will sharpen the estimation.
r
to consider, ignored if r
is not NULL
. Default is "ThirdW", one third of the diameter of the window. Other choices are "HalfW", and "QuarterW" and "D02005".
"HalfW", and "QuarterW" are for half or the quarter of the diameter of the window.
"D02005" is for the median distance observed between points, following Duranton and Overman (2005). "ThirdW" should be close to "DO2005" but has the advantage to be independent of the point types chosen as ReferenceType
and NeighborType
, to simplify comparisons between different types. "D02005" is approximated by "ThirdW" if Approximate
is not 0.
TRUE
, a global envelope sensu Duranton and Overman (2005) is calculated.
envelope
). There are methods for print and plot for this class.The fv
contains the observed value of the function, its average simulated value and the confidence envelope.
Lang G., Marcon E. and Puech F. (2014) Distance-Based Measures of Spatial Concentration: Introducing a Relative Density Function. HAL 01082178, 1-18.
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. Scholl, T. and Brenner, T. (2015) Optimizing distance-based methods for large data sets, Journal of Geographical Systems 17(4): 333-351.
Silverman, B. W. (1986). Density estimation for statistics and data analysis. Chapman and Hall, London.
mhat
data(paracou16)
# Keep only 50% of points to run this example
X <- as.wmppp(rthin(paracou16, 0.5))
plot(X)
# Calculate confidence envelope (should be 1000 simulations, reduced to 4 to save time)
NumberOfSimulations <- 4
Alpha <- .10
plot(mEnvelope(X, , NumberOfSimulations, Alpha,
"V. Americana", "Q. Rosea", Original = FALSE, SimulationType = "RandomLabeling"))
Run the code above in your browser using DataLab