mEnvelope {dbmss} | R Documentation |

## 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(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,
verbose = interactive())
```

### Arguments

`X` |
A point pattern ( |

`r` |
A vector of distances. If |

`NumberOfSimulations` |
The number of simulations to run, 100 by default. |

`Alpha` |
The risk level, 5% by default. |

`ReferenceType` |
One of the point types. |

`NeighborType` |
One of the point types, equal to the reference type by default to caculate univariate M. |

`CaseControl` |
Logical; if |

`Original` |
Logical; if |

`Approximate` |
if not 0 (1 is a good choice), exact distances between pairs of points are rounded to 1024 times |

`Adjust` |
Force the automatically selected bandwidth (following |

`MaxRange` |
The maximum value of |

`SimulationType` |
A string describing the null hypothesis to simulate. The null hypothesis may be
" |

`Global` |
Logical; if |

`verbose` |
Logical; if |

### Details

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

The global envelope is calculated by iteration: the simulations reaching one of the upper or lower values at any distance are eliminated at each step. The process is repeated until *Alpha / Number of simulations* simulations are dropped. The remaining upper and lower bounds at all distances constitute the global envelope. Interpolation is used if the exact ratio cannot be reached.

### Value

An envelope object (`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.

### References

Duranton, G. and Overman, H. G. (2005). Testing for Localisation Using Micro-Geographic Data. *Review of Economic Studies* 72(4): 1077-1106.

Kenkel, N. C. (1988). Pattern of Self-Thinning in Jack Pine: Testing the Random Mortality Hypothesis. *Ecology* 69(4): 1017-1024.

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 (2017). A typology of distance-based measures of spatial concentration. *Regional Science and Urban Economics*. 62:56-67.

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.

### See Also

### Examples

```
data(paracou16)
# Keep only 50% of points to run this example
X <- as.wmppp(rthin(paracou16, 0.5))
autoplot(X,
labelSize = expression("Basal area (" ~cm^2~ ")"),
labelColor = "Species")
# Calculate confidence envelope (should be 1000 simulations, reduced to 4 to save time)
NumberOfSimulations <- 4
Alpha <- .10
autoplot(mEnvelope(X, , NumberOfSimulations, Alpha,
"V. Americana", "Q. Rosea", Original = FALSE, SimulationType = "RandomLabeling"))
```

*dbmss*version 2.9-0 Index]