RaoAUC {rasterdiv} | R Documentation |
Accumulation function for parametric Rao's index of quadratic entropy (Q)
Description
RaoAUC computes the accumulation function (integral or area under the curve) of the parametric version of Rao's index of quadratic entropy (Q) on different classes of numeric matrices using a moving window algorithm.
Usage
RaoAUC(
alphas = 1:5,
x,
dist_m = "euclidean",
window = 9,
method = "classic",
rasterAUC = TRUE,
lambda = 0,
na.tolerance = 1,
rescale = FALSE,
diag = TRUE,
simplify = 0,
np = 1,
cluster.type = "SOCK",
debugging = FALSE
)
Arguments
alphas |
A continuous vector of alphas in the form start:end over which integrated the parametric Rao's index. Default value is 1:5. |
x |
Input data may be a matrix, a Spatial Grid Data Frame, a SpatRaster, or a list of these objects.
In the latter case, if |
dist_m |
Define the type of distance to be calculated between numerical categories. |
window |
The side of the square moving window, it must be an odd numeric value greater than 1 to ensure that the target pixel is in the centre of the moving window. Default value is 3. |
method |
Currently, there are two ways to calculate the parametric version of Rao's index.
If |
rasterAUC |
Boolean, if TRUE the output will be a SpatRaster object with x as a raster template. |
lambda |
The value of the lambda of Minkowski's distance. Considered only if |
na.tolerance |
Numeric value |
rescale |
Boolean. Considered only if |
diag |
Boolean. If TRUE then the diagonal of the distance matrix is filled with 0's, otherwise with NA's.
If |
simplify |
Number of decimal places to be retained to calculate distances in Rao's index. Only if x is floats. |
np |
The number of processes (cores) which will be spawned. Default value is 2. |
cluster.type |
The type of cluster which will be created. The options are "MPI" (which calls "makeMPIcluster"), "FORK" (which calls "makeForkCluster"), and "SOCK" (which calls "makeCluster"). Default type is "SOCK". |
debugging |
A boolean variable set to FALSE by default. If TRUE, additional messages will be printed. For debugging only. |
Details
The accumulation function for the parametric Rao's Index () is calculated integrating numerically
over a range of alphas. *RaoAUC* is therefore equal to
.
Where N is the number of pixels in a moving window, and alpha is a weight assigned to distances.
Value
A matrix of dimension dim(x)
. If rasterAUC=TRUE
, then the output is a SpatRaster with x as a template.
Author(s)
Matteo Marcantonio marcantoniomatteo@gmail.com
References
Rocchini, D., M. Marcantonio, and C. Ricotta (2017). Measuring Rao’s Q diversity index from remote sensing: An open source solution. Ecological Indicators. 72: 234–238.
See Also
Examples
# Minimal example; RaoAUC with alphas ranging from 1 to 10
a <- matrix(c(10,10,10,20,20,20,20,30,30), ncol=3, nrow=3)
out <- RaoAUC(alphas=1:10, x=a, window=3, dist_m="euclidean", na.tolerance=1, rasterAUC=TRUE)