logrr computes envelopes for the log ratio of spatial density functions. The numerator in this ratio is related to the "cases" and the denominator to the "controls".logrr(x, case = 2, nsim = 0, sigma = NULL, sigmacon = sigma, ...,
weights = NULL, edge = TRUE, varcov = NULL, at = "pixels",
leaveoneout = TRUE, adjust = 1, diggle = FALSE, nreport = 50)sigma.logrrenv. It's components are similar to those returned by the density.ppp function from the spatstat package, with the intensity values replaces by the log ratio of spatial densities of f and g. Includes an array simr of dimension c(nx, ny, nsim + 1), where nx and ny are the number of x and y grid points used to estimate the spatial density. simr[,,1] is the log ratio of spatial densities for the observed data and the remaining nsim elements in the third dimension of the array are the log ratios of spatial densities from a new ppp simulated under the random labeling hypothesis.data(grave)
r = logrr(grave)
plot(r)
rsim = logrr(grave, nsim = 9)Run the code above in your browser using DataLab