lgcpSim {lgcp} | R Documentation |
lgcpSim function
Description
Approximate simulation from a spatiotemoporal log-Gaussian Cox Process. Returns an stppp object.
Usage
lgcpSim(
owin = NULL,
tlim = as.integer(c(0, 10)),
spatial.intensity = NULL,
temporal.intensity = NULL,
cellwidth = 0.05,
model.parameters = lgcppars(sigma = 2, phi = 0.2, theta = 1),
spatial.covmodel = "exponential",
covpars = c(),
returnintensities = FALSE,
progressbar = TRUE,
ext = 2,
plot = FALSE,
ratepow = 0.25,
sleeptime = 0,
inclusion = "touching"
)
Arguments
owin |
polygonal observation window |
tlim |
time interval on which to simulate data |
spatial.intensity |
object that can be coerced into a spatialAtRisk object. if NULL then uniform spatial is chosen |
temporal.intensity |
the fixed temporal component: either a numeric vector, or a function that can be coerced into an object of class temporalAtRisk |
cellwidth |
width of cells in same units as observation window |
model.parameters |
parameters of model, see ?lgcppars. |
spatial.covmodel |
spatial covariance function, default is exponential, see ?CovarianceFct |
covpars |
vector of additional parameters for spatial covariance function, in order they appear in chosen model in ?CovarianceFct |
returnintensities |
logigal, whether to return the spatial intensities and true field Y at each time. Default FALSE. |
progressbar |
logical, whether to print a progress bar. Default TRUE. |
ext |
how much to extend the parameter space by. Default is 2. |
plot |
logical, whether to plot intensities. |
ratepow |
power that intensity is raised to for plotting purposes (makes the plot more pleasign to the eye), defaul 0.25 |
sleeptime |
time in seconds to sleep between plots |
inclusion |
criterion for cells being included into observation window. Either 'touching' or 'centroid'. The former includes all cells that touch the observation window, the latter includes all cells whose centroids are inside the observation window. |
Details
The following is a mathematical description of a log-Gaussian Cox Process, it is best viewed in the pdf version of the manual.
Let \mathcal Y(s,t)
be a spatiotemporal Gaussian process, W\subset R^2
be an
observation window in space and T\subset R_{\geq 0}
be an interval of time of interest.
Cases occur at spatio-temporal positions (x,t) \in W \times T
according to an inhomogeneous spatio-temporal Cox process,
i.e. a Poisson process with a stochastic intensity R(x,t)
,
The number of cases, X_{S,[t_1,t_2]}
, arising in
any S \subseteq W
during the interval [t_1,t_2]\subseteq T
is
then Poisson distributed conditional on R(\cdot)
,
X_{S,[t_1,t_2]} \sim \mbox{Poisson}\left\{\int_S\int_{t_1}^{t_2} R(s,t)d sd t\right\}
Following Brix and Diggle (2001) and Diggle et al (2005), the intensity is decomposed multiplicatively as
R(s,t) = \lambda(s)\mu(t)\exp\{\mathcal Y(s,t)\}.
In the above, the fixed spatial component, \lambda:R^2\mapsto R_{\geq 0}
,
is a known function, proportional to the population at risk at each point in space and scaled so that
\int_W\lambda(s)d s=1,
whilst the fixed temporal component,
\mu:R_{\geq 0}\mapsto R_{\geq 0}
, is also a known function with
\mu(t) \delta t = E[X_{W,\delta t}],
for t
in a small interval of time, \delta t
, over which the rate of the process over W
can be considered constant.
Value
an stppp object containing the data
References
Benjamin M. Taylor, Tilman M. Davies, Barry S. Rowlingson, Peter J. Diggle (2013). Journal of Statistical Software, 52(4), 1-40. URL http://www.jstatsoft.org/v52/i04/
Brix A, Diggle PJ (2001). Spatiotemporal Prediction for log-Gaussian Cox processes. Journal of the Royal Statistical Society, Series B, 63(4), 823-841.
Diggle P, Rowlingson B, Su T (2005). Point Process Methodology for On-line Spatio-temporal Disease Surveillance. Environmetrics, 16(5), 423-434.
Wood ATA, Chan G (1994). Simulation of Stationary Gaussian Processes in [0,1]d. Journal of Computational and Graphical Statistics, 3(4), 409-432.
Moller J, Syversveen AR, Waagepetersen RP (1998). Log Gaussian Cox Processes. Scandinavian Journal of Statistics, 25(3), 451-482.
See Also
lgcpPredict, showGrid.stppp, stppp
Examples
## Not run: library(spatstat.explore); library(spatstat.utils); xyt <- lgcpSim()