Calculate fractal Dimension using the standard deviation method
Usage
fd_sd(
data,
lvec,
regmethod = "mean",
keep_data = FALSE,
plot = FALSE,
parallel = FALSE,
ncores = (parallel::detectCores() - 1)
)
Arguments
- data
Digital elevation model of class RasterLayer.
- lvec
Vector of scales to use for calculation.
- regmethod
Method to use for linear regression between scale (lvec) and height range. One of
raw
(all data),mean
(default)median
orends
(minimum and maximum scale only)- keep_data
Logical. Keep the data used for fd calculation? Defaults to FALSE.
- plot
Logical. Show plot of scales relative to data?
- parallel
Logical. Use parallel processing? Note: parallel must be installed.
- ncores
Number of cores to use when parallel = TRUE.
Details
Calculates fractal dimension using the standard deviation method,
an analogue of the variation method, but using the standard deviation in height per grid cell instead of the full height range.
If lvec
is not specified, a default based on resolution and extent will be used.
A rule of thumb is that lvec
should range at least an order of magnitude.
However, large ranges also average-out fractal dimension of a surface that might have
phase transitions, and therefore a thorough exploration of height ranges is suggested using the plot
.
regmethod
specifies whether data is summarized by taking the mean or median of height ranges across scales or all data is used.
regmethod
"raw" is not recommended because the regression will give much more weight to the lower scales that include more points and likely underestimate D.