George Limitsios
2012-Dec-07 18:35 UTC
[R] Fwd: Simulation of spatial Log-Gaussian Cox process in Spatstat
Hello, I have fitted a Log-Gaussian Cox Process on my data but when I try to use "simulate.kppm" of the spatstat package I get this error: Error in rLGCP(model = model, mu = mu, param = param, ..., win = win) : The spatial domain of the pixel image ?mu? does not cover the simulation window ?win? I've used covariates as im, changed the npixel value of the spatstat options to match the dimensions of the covariates images, but the problem keeps showing up. Maybe it has something to do with the irregular owin used as window of the ppp object? I'd appreciate any help! Regards, George -- ==================================George Limitsios MSc. "Geography and Applied Geoinformatics" Dep. of Geography University of the Aegean
Rolf Turner
2012-Dec-07 22:17 UTC
[R] Fwd: Simulation of spatial Log-Gaussian Cox process in Spatstat
On 08/12/12 07:35, George Limitsios wrote:> Hello, > > I have fitted a Log-Gaussian Cox Process on my data but when I try to > use "simulate.kppm" of the spatstat package I get this error: > > Error in rLGCP(model = model, mu = mu, param = param, ..., win = win) : > The spatial domain of the pixel image ?mu? does not cover the > simulation window ?win? > > > I've used covariates as im, changed the npixel value of the spatstat > options to match the dimensions of the covariates images, but the > problem keeps showing up. > > Maybe it has something to do with the irregular owin used as window of > the ppp object?An "irregular" window should not cause any problem. Can you supply a reproducible example --- including a pattern (object of class "ppp") and the image (object of class "im") that you use as a covariate? Then I can look into the problem. I tried using simulate.kppm() on a toy example of a fit to an inhomogeneous log Gaussian Cox process (with a polygonal window) just now, and it seemed to work just fine. cheers, Rolf Turner