# Aindex

##### R function for calculating the Hodder-Okell's A index of spatial association

The function allows to calculate the Hodder-Okell's A index of spatial association between the features of two point patterns.

- Keywords
- Aindex

##### Usage

`Aindex(x, y, studyplot = NULL, B = 199, addmap = FALSE)`

##### Arguments

- x
Point pattern (SpatialPointDataframe class).

- y
Point pattern (SpatialPointDataframe class).

- studyplot
Feature (of polygon type; SpatialPolygonsDataFrame class) representing the study area; if not provided, the study area is internally worked out as the bounding polygon based on the union the convex hulls of the x and y patterns. This is only used for visualization purpose, should the user want to plot the two point patterns within the actual study area.

- B
Number of permutations (199 by default).

- addmap
FALSE (default) or TRUE if the user does not want or wants a map of the study area and of the two patterns to be displayed.

##### Details

The functions takes as input two point patterns (SpatialPointDataframe class) and calculate the A index. Details about the latter are provided by: Orton C. 1980, "Mathematics in Archeology", Glasgow: William Collins Sons & Co Ltd, pp. 154-155 Blankholm P. 1990, "Intrasite spatial Analysis in Theory and Practice", Aarhus: Aarhus University Press, pp. 130-135.

The A index is about equal to 1 when the two patterns are randomly mingled; it is smaller than 1 when the two patterns are segregated; it is larger than 1 when the features of the two point patterns tend to occur together. The computational details are provided by Blankholm's book cited above (page 132).

The significance of the A index is calculated via the randomized approach devised by: Kintigh K W. 1990, <U+201C>Intrasite Spatial Analysis: A Commentary of Major Methids<U+201D>. In Voorrips A, <U+201C>Mathematics and Information Science in Archaeology: A Flexible Framework<U+201D>, Studies in Modern Archaeology 3: 165-200

Given two patterns A and B being analysed, the procedure keeps the points location unchanged and randomly assigns the points to either pattern. The random re-assignment is performed B times (199 by default) and each time the A index is calculated. One-tailed and two-tailed p values are calculated following the procedure described by Baddeley et al., "Spatial Point Patterns. Methodology and Applications with R", CRC Press 2016, p. 387.

##### Value

The function produces: -an histogram showing the frequency distribution of the randomized A index, with vertical reference lines representing the 0.025th and 0.975th quantile of the distribution. A black dot represents the observed A index. At the bottom of the chart the randomized p values are reported; -optionally (setting the 'addmap' parameter to TRUE), a map showing the point patterns (and the study area, if supplied).

##### See Also

##### Examples

```
# NOT RUN {
# calculate the Hodder-Okell's A index for the two patterns, and plot the map
Aindex(springs, points, addmap=TRUE)
# }
```

*Documentation reproduced from package GmAMisc, version 1.0.0, License: GPL (>= 2)*