Description Usage Arguments Details Value References See Also Examples

View source: R/coarse_graining.R

This function averages the spatial data locally. It divides
the input matrix into submatrices of dimension `subsize`

and
averages the spatial data in these submatrices. By doing this, the
dimension of resultant matrix is reduced by a factor of
`subsize`

.

1 | ```
coarse_grain(mat, subsize)
``` |

`mat` |
A matrix |

`subsize` |
Dimension of the submatrix. This has to be a positive integer smaller than the dimension of input matrix. |

If the data is classified into discrete units, the calculation of variance and skewness can give spurious results irrelevant to the proximity to transition. Therefore, discrete data should be 'coarse-grained' before calculating the spatial early warning signals. However, this can also be applied to continuous state data.

A matrix of reduced dimension.

Sankaran, S., Majumder, S., Kefi, S. and Guttal, V. (2017). Implications of being discrete and spatial for detecting early warning signals of regime shifts. Ecological Indicators.

1 2 3 4 5 6 7 8 9 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.