A function to simulate a spatial LGCP.
lgcpSimSpatialCovariates(
formula,
owin,
regionalcovariates = NULL,
pixelcovariates = NULL,
Zmat = NULL,
beta,
poisson.offset = NULL,
cellwidth,
model.parameters,
spatial.covmodel = "exponential",
covpars = c(),
ext = 2,
plot = FALSE,
inclusion = "touching"
)
a formula of the form X ~ var1 + var2 etc.
the observation window on which to do the simulation
an optional object of class SpatialPolygonsDataFrame containing covariates
an optional object of class SpatialPixelsDataFrame containing covariates
optional design matrix, if the polygon/polygon overlays have already been computed
the parameters, beta for the model
the poisson offet, created using a SpatialAtRisk.fromXYZ class of objects
the with of cells on which to do the simulation
the paramters of the model eg list(sigma=1,phi=0.2)
the choice of spatial covariance model, can be anything from the RandomFields covariance function, CovariacenFct.
additional covariance parameters, for the chosen model, optional.
the amount by which to extend the observation grid in each direction, default is 2
whether to plot the resulting data
criterion for cells being included into observation window. Either 'touching' or 'centroid'. The former, the default, includes all cells that touch the observation window, the latter includes all cells whose centroids are inside the observation window.
a ppp onject containing the simulated data