Reputation: 11
I'm trying to model a Multidimensional Space-Time Point Pattern (ppx object from spatstat package). But I didn't find any way at package documentation.
I tried this:
library(spatstat)
set.seed(2022)
df <- data.frame(x=runif(4),y=runif(4),t=runif(4),
age=rep(c("old", "new"), 2),
size=runif(4))
X <- ppx(data=df, coord.type=c("s","s","t","m","m"))
ppm(X~1)
And R showed:
Error in ppm.default(Q = X, trend = ~x, data = NULL, interaction = NULL) :
Argument Q must be a point pattern or a quadrature scheme
Is there any way to convert ppx object to point pattern or a quadrature scheme? Should I need do another thing in order to fit a model?
Upvotes: 1
Views: 113
Reputation: 2973
No. The model-fitting function ppm
only accepts point patterns in two-dimensional space (class ppp
). Model-fitting for higher dimensional point patterns (class ppx
) is not yet supported in the spatstat
package.
Upvotes: 1