Contagion (Aggregation metric)
lsm_l_contag(landscape, verbose)# S3 method for RasterLayer
lsm_l_contag(landscape, verbose = TRUE)
# S3 method for RasterStack
lsm_l_contag(landscape, verbose = TRUE)
# S3 method for RasterBrick
lsm_l_contag(landscape, verbose = TRUE)
# S3 method for stars
lsm_l_contag(landscape, verbose = TRUE)
# S3 method for list
lsm_l_contag(landscape, verbose = TRUE)
Raster* Layer, Stack, Brick or a list of rasterLayers.
Print warning message if not sufficient patches are present
tibble
$$CONTAG = 1 + \frac{\sum \limits_{q = 1}^{n_{a}} p_{q} ln(p_{q})}{2ln(t)}$$
where \(p_{q}\) the adjacency table for all classes divided by the sum of that table and \(t\) the number of classes in the landscape.
CONTAG is an 'Aggregation metric'. It is based on cell adjacencies and describes the probability of two random cells belonging to the same class. \(p_{q}\) is the cell adjacency table, where the order is preserved and pairs of adjacent cells are counted twice. Contagion is affected by both the dispersion and interspersion of classes. E.g., low class dispersion (= high proportion of like adjacencies) and low interspersion (= uneven distribution of pairwise adjacencies) lead to a high contagion value.
The number of classes to calculate CONTAG must be >= than 2.
McGarigal, K., SA Cushman, and E Ene. 2012. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical and Continuous Maps. Computer software program produced by the authors at the University of Massachusetts, Amherst. Available at the following web site: http://www.umass.edu/landeco/research/fragstats/fragstats.html
Riitters, K.H., O<U+2019>Neill, R.V., Wickham, J.D. & Jones, K.B. (1996). A note on contagion indices for landscape analysis. Landscape ecology, 11, 197<U+2013>202.
# NOT RUN {
lsm_l_contag(landscape)
# }
Run the code above in your browser using DataCamp Workspace