[R] spatstat rmh problem

Rolf Turner r.turner at auckland.ac.nz
Tue Sep 16 12:22:27 CEST 2014


There was indeed a bug in rmh() w.r.t. the "new.coeff" argument.
The bug has been fixed and will not be present in the next release of 
spatstat.

cheers,

Rolf Turner

On 16/09/14 16:30, Sebastian Schutte wrote:
> Thanks so much for your comments. Sorry for not having sent a running
> example from the start. Here it is:
>
> library (spatstat)
>
> #Load example data
> data(demopat)
> #Generate a random point pattern within the polygon
> set.seed(12345)
> pdat <- rpoint(200,win=demopat$window)
> #Generate a distmap, which will serve as covariate information
> im.cdat <- as.im(distmap(pdat))
> #Now the random seed is fixed and a new set of random points is
> generated for the example
> set.seed(11111)
> pdat <- rpoint(200,win=demopat$window)
> #Fitting a model to the data
> mod <- ppm (pdat ~  im.cdat)
> #Now a point pattern is simulated via rmh from the fitted model an
> visualized as a density surface
> set.seed(22222)
> plot(density(rmh(mod)))
> #And here is the problem: When I repeat the exercise with different
> coefs, the very same patter come out. "new.coef" has no effect.
> set.seed(22222)
> plot(density(rmh(mod),new.coef=c(1,200)))
>
> What am I missing?


-- 
Rolf Turner
Technical Editor ANZJS



More information about the R-help mailing list