https://github.com/cran/spatstat
Raw File
Tip revision: 9e10ba090281d182ac2ae985fd6edead6704d8cf authored by Adrian Baddeley on 15 June 2011, 18:11:32 UTC
version 1.22-2
Tip revision: 9e10ba0
eem.R
# eem.R
#
# Computes the Stoyan-Grabarnik "exponential energy weights" 
#
# $Revision: 1.4 $ $Date: 2008/07/25 19:51:05 $
#

eem <- function(fit, check=TRUE) {
  verifyclass(fit, "ppm")
  lambda <- fitted.ppm(fit, check=check)
  Q <- quad.ppm(fit)
  Z <- is.data(Q)
  eemarks <- 1/lambda[Z]
  attr(eemarks, "type") <- "eem"
  attr(eemarks, "typename") <- "exponential energy marks"
  return(eemarks)
}
back to top