Learn R Programming

lgcp (version 1.8)

target.and.grad.spatiotemporal: target.and.grad.spatiotemporal function

Description

A function to compute the target and gradient for 'spatial only' MALA

Usage

target.and.grad.spatiotemporal(
  Gamma,
  nis,
  cellarea,
  rootQeigs,
  invrootQeigs,
  mu,
  spatial,
  logspat,
  temporal,
  bt,
  gt,
  gradtrunc
)

Arguments

Gamma

current state of the chain, Gamma

nis

matrix of cell counts

cellarea

area of cells, a positive number

rootQeigs

square root of the eigenvectors of the precision matrix

invrootQeigs

inverse square root of the eigenvectors of the precision matrix

mu

parameter of the latent Gaussian field

spatial

spatial at risk function, lambda, interpolated onto correct grid

logspat

log of spatial at risk function, lambda*scaleconst, interpolated onto correct grid

temporal

fitted temoporal values

bt

in Brix and Diggle vector b(delta t)

gt

in Brix and Diggle vector g(delta t) (ie the coefficient of R in G(t)), with convention that (deltat[1])=Inf

gradtrunc

gradient truncation parameter

Value

the back-transformed Y, its exponential, the log-target and gradient for use in MALAlgcp