lgcpST: Alternative to lgcpPredictSpatioTemporalPlusPars

Description Usage Arguments Details Value

Description

Internal function and alternative to lgcp::lgcpPredictSpatioTemporalPlusPars.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
lgcpST(
  formula,
  xyt,
  T,
  laglength,
  ZmatList = NULL,
  model.priors,
  model.inits = lgcpInits(),
  spatial.covmodel,
  cellwidth = NULL,
  poisson.offset = NULL,
  mcmc.control,
  output.control = setoutput(),
  gradtrunc = Inf,
  ext = 2,
  inclusion = "touching"
)

Arguments

formula

a formula object of the form X ~ var1 + var2 etc. The name of the dependent variable must be "X". Only accepts 'simple' formulae, such as the example given.

xyt

An object of class stppp

T

the time point of interest

laglength

the number of previous time points to include in the analysis

ZmatList

A list of design matrices Z constructed with getZmat and possibly addTemporalCovariates see the details below and Bayesian_lgcp vignette for details on how to construct this.

model.priors

model priors, set using lgcpPrior

model.inits

model initial values. The default is NULL, in which case lgcp will use the prior mean to initialise eta and beta will be initialised from an oversispersed glm fit to the data. Otherwise use lgcpInits to specify.

spatial.covmodel

choice of spatial covariance function. See ?CovFunction

cellwidth

the width of computational cells

poisson.offset

A list of SpatialAtRisk objects (of length the number of types) defining lambda_k (see below)

mcmc.control

MCMC paramters, see ?mcmcpars

output.control

output choice, see ?setoutput

gradtrunc

truncation for gradient vector equal to H parameter Moller et al 1998 pp 473. Default is Inf, which means no gradient truncation, which seems to work in most settings.

ext

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.

inclusion

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.

Details

A copy of lgcp::lgcpPredictSpatioTemporalPlusPars that parallelises the sampler and produces a reduced output and lgcpReal object. See help(lgcpPredictSpatioTemporalPlusPars) for more information.

Value

an object of class lgcpPredictSpatioTemporalPlusParameters


realTimeSurv documentation built on May 18, 2021, 9:07 a.m.