Reputation: 25
I would like to do a point process analysis to model point patterns on 1 km square resolution. I have three layers of covariates as pixel images named; rd, pd and ras. The PPP object is on a polygonal boundary enclosing [-3.1523926, -2.5752286] x [53.31128, 53.70412] units
I have tried the quadscheme function Q <- quadscheme(data, method="grid", eps=1)
passed the quad class Q into the ppm formula, model1 <- ppm(Q~ras/rd+pd)
It cants return any results. any help is highly appreciated
Upvotes: 0
Views: 142
Reputation: 2973
You say the ppm
command didn't return any results. But you used an assignment, model1 <- ppm(...)
. This would not produce any printed output. You could print the result: try typing model1
or print(model1)
or coef(model1)
.
You say you want to "model point patterns on 1 km square resolution". Does this mean that the point pattern data are (a) coordinates rounded to the nearest 1km, (b) indicators of the presence/absence of points within each 1km pixel in a pixel grid, (c) spatial coordinates recorded with reasonable accuracy but which you want to analyse by discretising to 1km pixels?
If (c) is correct, then you could use the spatstat
function slrm
instead of ppm
. Just slrm(data ~ ras + pd + rd)
should work.
The command quadscheme(data, method="grid", eps=1)
does not discretise the spatial coordinates and does not help you with objective (c). It's complicated; I recommend you don't use quadscheme
at all, as this is a rather advanced feature. Instead, if data
is already a point pattern of class "ppp"
, you could use data
instead of Q
in your call to the model-fitting function ppm
.
Example data would help.
Upvotes: 0