------------------------------------------------------- !IMPORTANT! after library(lgcp) this will be a dummy function. In order to use, type getlgcpPredictSpatialINLA() at the console. This will download and install the true function. -------------------------------------------------------
lgcpPredictSpatialINLA(
sd,
ns,
model.parameters = lgcppars(),
spatial.covmodel = "exponential",
covpars = c(),
cellwidth = NULL,
gridsize = NULL,
spatial.intensity,
ext = 2,
optimverbose = FALSE,
inlaverbose = TRUE,
generic0hyper = list(theta = list(initial = 0, fixed = TRUE)),
strategy = "simplified.laplace",
method = "Nelder-Mead"
)
a spatial point pattern object, see ?ppp
size of neighbourhood to use for GMRF approximation ns=1 corresponds to 3^2-1=8 eight neighbours around each point, ns=2 corresponds to 5^2-1=24 neighbours etc ...
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
integer multiple by which grid should be extended, default is 2. Generally this will not need to be altered, but if the spatial correlation decays slowly, increasing 'ext' may be necessary.
logical whether to print optimisation details of covariance matching step
loogical whether to print the inla fitting procedure to the console
optional hyperparameter list specification for "generic0" INLA model. default is list(theta=list(initial=0,fixed=TRUE)), which effectively treats the precision matrix as known.
inla strategy
optimisation method to be used in function matchcovariance, default is "Nelder-Mead". See ?matchcovariance
the results of fitting the model in an object of class lgcpPredict
The function lgcpPredictSpatialINLA
performs spatial prediction for log-Gaussian Cox Processes using the integrated nested Laplace approximation.
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)\) be a spatial Gaussian process and \(W\subset R^2\) be an observation window in space. Cases occur at spatial positions \(x \in W\) according to an inhomogeneous spatial Cox process, i.e. a Poisson process with a stochastic intensity \(R(x)\), The number of cases, \(X_{S}\), arising in any \(S \subseteq W\) is then Poisson distributed conditional on \(R(\cdot)\), $$X_{S} \sim \mbox{Poisson}\left\{\int_S R(s)ds\right\}$$ Following Brix and Diggle (2001) and Diggle et al (2005) (but ignoring temporal variation), the intensity is decomposed multiplicatively as $$R(s,t) = \lambda(s)\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.$$
Before calling this function, the user must decide on the parameters, spatial covariance model, spatial discretisation, fixed spatial (\(\lambda(s)\)) component and whether or not any output is required. Note there is no autorotate option for this function.
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.
lgcpPredict 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,