| gblcc | R Documentation |
Estimates the gliding box lacunarity (GBL) of a stationary RACS using centred covariance estimates (Hingee et al., 2017). The centred covariance and coverage probability can be provided or estimated from binary map.
gblcc(
boxes,
cencovar = NULL,
p = NULL,
xiim = NULL,
estimator = "pickaH",
integrationMethod = "harmonisesum"
)
gblcc.inputcovar(boxes, cencovar, p, integrationMethod = "harmonisesum")
boxes |
Either a list of side lengths for square boxes or a list of |
cencovar |
A |
p |
The coverage probability. Typically estimated by the fraction of the observation window covered by the set of interest. |
xiim |
An observation of a stationary RACS as an |
estimator |
If an observation |
integrationMethod |
The integration method used by |
If we denote the estimated centred covariance by
\hat{\kappa}(v) and coverage probability \hat{p} then
the estimate of GBL is
1 + \frac{1}{\hat{p}^2 |B|^2}\int \gamma_B(v)\hat{\kappa}(v)dv,
where B is each of the sets (often called a box) specified by boxes,
\gamma_B is the set covariance of B,
|B| is the area of B,
p is the coverage probability of a stationary RACS.
The set covariance of B is computed empirically using spatstat's setcov function, which converts B into a binary pixel mask using as.mask defaults. Computation speed can be increased by setting a small default number of pixels, npixel, in spatstat's global options (accessed through spatstat.options), however fewer pixels also decreases the accuracy of the GBL computation.
If boxes is a list of numerical values then GBL is estimated for square boxes with side length given by boxes.
The returned object is then an fv object containing estimates of GBL, box mass variance and box mass mean.
If boxes is a list of owin objects then gblcc returns a dataframe of with columns corresponding to estimates of GBL, box mass variance and box mass mean.
Note if NA or NaN values in the covariance object are used then gblc will return NA or NaN instead of an GBL value.
gblcc.inputcovar(): GBL estimates from already estimated centred covariance.
Hingee K, Baddeley A, Caccetta P, Nair G (2019). Computation of lacunarity from covariance of spatial binary maps. Journal of Agricultural, Biological and Environmental Statistics, 24, 264-288. DOI: 10.1007/s13253-019-00351-9.
xi <- heather$coarse
cencovar <- cencovariance(xi, obswin = Frame(xi), estimators = c("pickaH"), drop = TRUE)
p <- area(xi) / area(Frame(xi))
sidelengths <- seq(0.3, 14, by = 1)
# reduce resolution in setcov() for faster (less accurate) computation
oldopt <- spatstat.options()
spatstat.options("npixel" = 2^5)
# compute GBL estimate for square boxes from estimated centred covariance
gblccest <- gblcc(sidelengths, cencovar, p)
# compute GBL estimate for boxes that are discs
discboxes <- lapply(sidelengths / 2, disc)
discgbls <- gblcc(discboxes, cencovar, p)
# compute GBL estimates from binary map
xiim <- as.im(xi, na.replace = 0)
gblccest <- gblcc(sidelengths, xiim = xiim, estimator = "pickaH")
spatstat.options(oldopt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.