Learn R Programming

lgcp (version 1.3-8)

target.and.grad.spatial: target.and.grad.spatial function

Description

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

Usage

target.and.grad.spatial(Gamma, nis, cellarea, rootQeigs, invrootQeigs, mu,
  spatial, logspat, scaleconst, 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
scaleconst
the expected number of cases
gradtrunc
gradient truncation parameter

Value

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