Reputation: 3
I'm using spatstat
to run some mppm
models and would like to be able to calculate standard errors for the predictions as in predict.ppm
. I could use predict.ppm
on each point process individually of course, but I'm wondering if this in invalid for any reason or if there is a better way of doing so?
Upvotes: 0
Views: 68
Reputation: 2973
This is not yet implemented as an option in predict.mppm
. (It is on our long list of things to do. I will move it closer to the top of the list.)
However, it is available by applying predict.ppm
to each element of subfits(model)
, where model
was the original fitted model of class mppm
. Something like:
m <- mppm(......)
fits <- subfits(m)
Y <- lapply(fits, predict, se=TRUE)
Just to clarify, fits[[i]]
is a point process model, of class ppm
, for the data in row i
of the data hyperframe, implied by the big model m
. The parameter estimates and variance estimates in fits[[i]]
are based on information from the entire hyperframe. This is not the same as fitting a separate model of class ppm
to the data in each row of the hyperframe and calculating predictions and standard errors for those fits.
Upvotes: 1