Learn R Programming

dbmss (version 1.2.4)

g.r: Estimation of the g function

Description

Estimates the g function

Usage

g.r(X, r, ReferenceType = "", NeighborType = "")

Arguments

X
A point pattern (ppp.object), marks must be a dataframe with two columns: PointType: labels, as factors. PointWeight: weights.
r
A vector of distances.
ReferenceType
one of the point types. Default is all point types.
NeighborType
one of the point types. Default is all point types.

Value

  • A vector containing g(r) values.

Details

The computation of g.r relies on spatstat function sewpcf.

References

Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.

See Also

gEnvelope

Examples

Run this code
data(paracou16)
plot(paracou16)

# Calculate g
r <- 0:40
ActualValues.X <- g.r(paracou16, r, "Q. Rosea", "V. Americana")

# Plot
PlotResults(r, ActualValues.X, ylab="g", ReferenceValue=1)

Run the code above in your browser using DataLab