0

Calling rMatClust() with parameter saveparents=TRUE is not providing with the parent point pattern in the result. How to retrieve the parent points?

I am trying something like the following:

parent.kappa <- function(x,y){ exp(-8.944711 - 4.645625*10^(-5)*x -6.437164*10^(-4)*y)

simulated.ppp <- rMatClust(kappa=parent.kappa, scale=10, mu=5, nsim = 1, win=owin(c(0, 1000), c(0, 1000)), saveLambda=TRUE, saveparents=TRUE)

According to the manual simulated.ppp should have an attribute named parents (a point pattern object) that holds the parent points of the Matern clusters.

sanjana
  • 15
  • 5
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Aug 28 '20 at 03:26
  • Which version of `spatstat` are you using? The current release is `1.64-1` – Adrian Baddeley Aug 30 '20 at 08:34
  • I updated to release ``1.64-1``, and found the ``parents`` attribute. Thanks! – sanjana Sep 01 '20 at 07:56

1 Answers1

0

I cannot reproduce this problem. When I run your example code using spatstat 1.64-1, the resulting point pattern simulated.ppp does have the desired attribute, attr(simulated.ppp, "parents").

However, looking at the code for rMatClust, there is one special case where the result could be returned without the attribute "parents". Namely, if the model parameters determine a point process with very weak clustering, then the code calls rpoispp to generate the result. Is it possible that you encountered this situation?

Please provide an example which demonstrates the problem.

Adrian Baddeley
  • 2,534
  • 1
  • 5
  • 8