lgcpPredictAggregated: lgcpPredictAggregated function

Description Usage Arguments Details Value References See Also

View source: R/lgcpPredictSpatioTemporal.R


The function lgcpPredict performs spatiotemporal prediction for log-Gaussian Cox Processes for point process data where counts have been aggregated to the regional level. This is achieved by imputation of the regional counts onto a spatial continuum; if something is known about the underlying spatial density of cases, then this information can be added to improve the quality of the imputation, without this, the counts are distributed uniformly within regions.


lgcpPredictAggregated(app, popden = NULL, T, laglength,
  model.parameters = lgcppars(), spatial.covmodel = "exponential",
  covpars = c(), cellwidth = NULL, gridsize = NULL, spatial.intensity,
  temporal.intensity, mcmc.control, output.control = setoutput(),
  autorotate = FALSE, gradtrunc = NULL, n = 100, dmin = 0,
  check = TRUE)



a spatio-temporal aggregated point pattern object, see ?stapp


a spatialAtRisk object of class 'fromFunction' describing the population density, if known. Default is NULL, which gives a uniform density on each region.


time point of interest


specifies lag window, so that data from and including time (T-laglength) to time T is used in the MALA algorithm


values for parameters, see ?lgcppars


correlation type see ?CovarianceFct


vector of additional parameters for certain classes of covariance function (eg Matern), these must be supplied in the order given in ?CovarianceFct


width of grid cells on which to do MALA (grid cells are square). Note EITHER gridsize OR cellwidthe must be specified.


size of output grid required. Note EITHER gridsize OR cellwidthe must be specified.


the fixed spatial component: an object of that can be coerced to one of class spatialAtRisk


the fixed temporal component: either a numeric vector, or a function that can be coerced into an object of class temporalAtRisk


MCMC paramters, see ?mcmcpars


output choice, see ?setoutput


logical: whether or not to automatically do MCMC on optimised, rotated grid.


truncation for gradient vector equal to H parameter Moller et al 1998 pp 473. Set to NULL to estimate this automatically (default). Set to zero for no gradient truncation.


parameter for as.stppp. If popden is NULL, then this parameter controls the resolution of the uniform. Otherwise if popden is of class 'fromFunction', it controls the size of the imputation grid used for sampling. Default is 100.


parameter for as.stppp. If any reginal counts are missing, then a set of polygonal 'holes' in the observation window will be computed for each. dmin is the parameter used to control the simplification of these holes (see ?simplify.owin). default is zero.


logical parameter for as.stppp. If any reginal counts are missing, then roughly speaking, check specifies whether to check the 'holes'. further notes on autorotate argument: If set to TRUE, and the argument spatial is not NULL, then the argument spatial must be computed in the original frame of reference (ie NOT in the rotated frame). Autorotate performs bilinear interpolation (via interp.im) on an inverse transformed grid; if there is no computational advantage in doing this, a warning message will be issued. Note that best accuracy is achieved by manually rotating xyt and then computing spatial on the transformed xyt and finally feeding these in as arguments to the function lgcpPredict. By default autorotate is set to FALSE.


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_{≥q 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}≤ft{\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) = λ(s)μ(t)Exp{\mathcal Y(s,t)}.

In the above, the fixed spatial component, λ:R^2\mapsto R_{≥q 0}, is a known function, proportional to the population at risk at each point in space and scaled so that

\int_Wλ(s)d s=1,

whilst the fixed temporal component, μ:R_{≥q 0}\mapsto R_{≥q 0}, is also a known function with

μ(t) δ t = E[X_{W,δ t}],

for t in a small interval of time, δ t, over which the rate of the process over W can be considered constant.

NOTE: the xyt stppp object can be recorded in continuous time, but for the purposes of prediciton, discretisation must take place. For the time dimension, this is achieved invisibly by as.integer(xyt$t) and as.integer(xyt$tlim). Therefore, before running an analysis please make sure that this is commensurate with the physical inerpretation and requirements of your output. The spatial discretisation is chosen with the argument cellwidth (or gridsize). If the chosen discretisation in time and space is too coarse for a given set of parameters (sigma, phi and theta) then the proper correlation structures implied by the model will not be captured in the output.

Before calling this function, the user must decide on the time point of interest, the number of intervals of data to use, the parameters, spatial covariance model, spatial discretisation, fixed spatial (λ(s)) and temporal (μ(t)) components, mcmc parameters, and whether or not any output is required.


the results of fitting the model in an object of class lgcpPredict


  1. 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/

  2. Brix A, Diggle PJ (2001). Spatiotemporal Prediction for log-Gaussian Cox processes. Journal of the Royal Statistical Society, Series B, 63(4), 823-841.

  3. Diggle P, Rowlingson B, Su T (2005). Point Process Methodology for On-line Spatio-temporal Disease Surveillance. Environmetrics, 16(5), 423-434.

  4. Wood ATA, Chan G (1994). Simulation of Stationary Gaussian Processes in [0,1]d. Journal of Computational and Graphical Statistics, 3(4), 409-432.

  5. Moller J, Syversveen AR, Waagepetersen RP (1998). Log Gaussian Cox Processes. Scandinavian Journal of Statistics, 25(3), 451-482.

See Also

KinhomAverage, ginhomAverage, lambdaEst, muEst, spatialparsEst, thetaEst, spatialAtRisk, temporalAtRisk, lgcppars, CovarianceFct, mcmcpars, setoutput print.lgcpPredict, xvals.lgcpPredict, yvals.lgcpPredict, plot.lgcpPredict, meanfield.lgcpPredict, rr.lgcpPredict, serr.lgcpPredict, intens.lgcpPredict, varfield.lgcpPredict, gridfun.lgcpPredict, gridav.lgcpPredict, hvals.lgcpPredict, window.lgcpPredict, mcmctrace.lgcpPredict, plotExceed.lgcpPredict, quantile.lgcpPredict, identify.lgcpPredict, expectation.lgcpPredict, extract.lgcpPredict, showGrid.lgcpPredict

lgcp documentation built on May 22, 2018, 5:05 p.m.