Skip to content

marked poisson process using a quadrature scheme and covariates in 'spatstat'

4 messages · Roman Hornung, Marcelino de la Cruz, Rolf Turner +1 more

#
On 04/05/11 23:33, Roman Hornung wrote:
I am somewhat puzzled by what you are trying to do.  Covariates may be 
used to
model the intensity of a point pattern.  The intensity is defined at 
every point of
the domain of definition of the pattern; in practice it must be defined 
at every
point of the observation window.

So in your case the objective would be to specify the intensity 
"lambda(u)" in terms
of your covariates at every point "u" of your observation window.  You 
say that
one of your covariates is ``type of road''.  Obviously if no road passes 
through "u"
then there is no ``type of road'' ***at*** "u".  So how does the 
intensity at u depend
on ``type of road''?  Clarify that idea, and all of your problems will 
disappear.

One idea, which you may be subconsciously entertaining, is that the 
intensity at
"u" depends on the type of the road nearest to u.  Or it might depend on the
types of all roads weighted in some way by the distance of the roads 
from "u".
Get it clear in your mind first how you want to model the intensity.  Then
build your image, or images, in terms of your roads data in a manner 
consistent
with your modelling criteria.

Note that the distmap() and distfun() functions in "spatstat" will allow 
you to determine the
distance from a given point to the nearest road (if the roads are 
represented as "psp"
objects).

     cheers,

             Rolf Turner
TM
#
Hello everyone,

I am looking for a R code to simulate an spatial distribution of multinomial 
classes (like colors classes) in a map.

The problem is find a a multivariate distribution of the color classes 
(covariate: map colors) and a continous variable (like rain or ph) to study 
different kriging (cokriging) methodologies to make cross-validation 
predictions in order to test the effect on prediction which helps solve some 
of the data I now encounter.

Does somebody know, what to do in such a situation?
Does somebody know, what to do treat multinomial classes covariate in 
spacetime models using kriging?

I found this (DCluster package), but I am not sure if my way is wrong:

----------------------------------------------------------------------------------------------
 library(DCluster)

 library(boot)
 library(spdep)

 data(nc.sids)

 sids<-data.frame(Observed=nc.sids$SID74)
 sids<-cbind(sids, 
Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))
 sids<-cbind(sids, Population=nc.sids$BIR74, x=nc.sids$x, y=nc.sids$y)

 #K&N's method over the centroids
 mle<-calculate.mle(sids, model="poisson")
 knresults<-opgam(data=sids, thegrid=sids[,c("x","y")], alpha=.05,
+  iscluster=kn.iscluster, fractpop=.5, R=100, model="multinomial", mle=mle)

 #Plot all centroids and significant ones in red

 plot(sids$x, sids$y, main="Kulldorff and Nagarwalla's method")
 points(knresults$x, knresults$y, col="red", pch=19)
 dev.off()
-----------------------------------------------------------------------------

Thank you very much in advance! Any tips are appreciated much!

     cheers,

             Toni Monle?n
              UB