Description Usage Arguments Value References Examples
Applies the Wiener-Khinchin theorem to extract spatial autocorrelation using Fast Fourier Transform techniques. This results in an extremely fast way to calculate a complete correlogram (correlation as a function of distance) for a raster image.
1 |
x |
A raster* object. Missing values are indicated by NA. |
file |
File to write results to as in writeRaster. If NULL a temporary file is written as in the raster package. |
The spatial autocorrelation matrix
en.wikipedia.org/wiki/WienerKhinchin_theorem
Xianlin Ma, Tingting Yao, A program for 2D modeling (cross) correlogram tables using fast Fourier transform, Computers & Geosciences, Volume 27, Issue 7, August 2001, Pages 763-774, ISSN 0098-3004, http://dx.doi.org/10.1016/S0098-3004(01)00007-3.
http://www.johnloomis.org/ece563/notes/freq/autoself/autoself.htm
http://www.seas.upenn.edu/~ese502/NOTEBOOK/Part_II/4_Variograms.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # packages used for the data generation
require(raster)
require(fields)
library(dplyr)
## first show the examples in Marcotte, Denis. 1996. "Fast Variogram Computation with FFT." Computers & Geosciences 22 (10): 1175–86. doi:10.1016/S0098-3004(96)00026-X.
m1=raster(matrix(c(3,6,5,7,2,2,4,NA,0),ncol=3,byrow=T))
m2=raster(matrix(c(10,NA,5,NA,8,7,5,9,11),ncol=3,byrow=T))
ac=acorr(m1,padlongitude=T,verbose=T)
## confirm nobs == nh11 on top of page 1179
10^as.matrix(ac[["nobs"]])
## comfirm acor= gh11 on top of page 1179
round(as.matrix(ac[["acor"]])/10,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.