I have obtained an mppm
object by fitting a model on several independent datasets using the mppm
function from the R
package spatstat
. How can I generate simulated realisations of this model and obtain the x
, y
, and marks
attributes of the simulations ?
I fitted my model as such:
data <- listof(NMJ1,NMJ2,NMJ3)
data <- hyperframe(X=1:3, Points=data)
model <- mppm(Points ~marks*sqrt(x^2+y^2), data)
where NMJ1, NMJ2, and NMJ3 are marked ppp
and are independent realisations of the same experiment.
sim <- simulate(model)
allows me to generate simulated realisations of this model, and plot(sim,axes = TRUE)
to plot them. sim
itself is an hyperframe
object:
> sim
Hyperframe:
Sim1
1 (ppp)
2 (ppp)
3 (ppp)
How can I access the values (x
, y
, and marks
) in this hyperframe ? My goal is to generate a large number of independent realisations from my model, and to use the simulated values for another task. Is there a practical way to obtain, retrieve and save these values ?