View source: R/contagdiscstate.R
contagdiscstate | R Documentation |
Calculates the disc-state contagion landscape metric as described in (Hingee, 2016; Hingee, 2019). The disc-state contagion landscape metric describes the entropy (mixing) between four possible states of a disc:
the disc is completely contained in Ξ
the disc does not intersect Ξ
the centre of the disc is in Ξ but the disc is not contained in Ξ
the disc intersects Ξ but the centre is outside Ξ
Disc-state contagion is a function of the disc radius.
The main difference to classical contagion (O'Neill, 1988) is that disc-state contagion is based on the spherical contact distribution instead of pixel neighbours. One impact of this design is that the distance with which to quantify the mixing between Ξ and the background may be chosen by the user by choosing the disc radius (for classical contagion this distance is fixed by the map resolution).
Note: to create fv
objects the function copies about 20 lines of code from the spatstat package.
contagdiscstate(XiH, XicH, p, normalise = FALSE)
XiH |
Conditional spherical contact distribution function for Ξ.
Typically this is an |
XicH |
Conditional spherical contact distribution for the complement of
Ξ. This is called the Conditional Core Probability in Hingee 2016.
Typically this is an |
p |
The coverage probability of Ξ. Can be estimated from binary maps using |
normalise |
Optional. If TRUE |
XiH
should be a function of radius that contains (estimates of) the
probability of a disc of radius r not intersecting Ξ if the
disc's centre is not in Ξ
\code{XiH}(r) = P(B_r(x) \subseteq Ξ^c | x \in Ξ^c).
Similarly XicH
should be (an estimate of) the
probability of a disc being fully contained in Ξ given its centre
is in Ξ
\code{XicH}(r)\approx P(B_r(x) \subseteq Ξ | x \in Ξ).
These can both be obtained using Hest
in
spatstat. For XicH
take care to apply Hest
to the complement
of Ξ with the observation window W.
If normalise
is TRUE
then the result is divided by
-2ln(2) and increased by 1 so that contagion will always be between 0
and 1.
If XiH
is an fv
object then an fv
object is returned.
If XiH
is a vector then the returned object is a vector the same length as XiH
with each element
corresponding to the contagion at each r
value of XiH
.
Hingee, K.L. (2016) Statistics for patch observations. International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences pp. 235-242. Prague: ISPRS.
Hingee, K.L. (2019) Spatial Statistics of Random Closed Sets for Earth Observations. PhD: Perth, Western Australia: University of Western Australia. Submitted.
O'Neill, R.V., Krummel, J.R., Gardner, R.H., Sugihara, G., Jackson, B., DeAngelis, D.L., et al. (1988) Indices of landscape pattern. Landscape Ecology, 1, 153-162.
xi <- heather$coarse obswindow <- Frame(heather$coarse) p <- coverageprob(xi, Frame(xi)) xiH <- Hest(xi, W = obswindow) #Sph. Contact Distrution Estimate xicH <- Hest(complement.owin(xi), W = obswindow) #Conditional Core Prob. Estimate contagion <- contagdiscstate(xiH, xicH, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.