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?