A function to compute the target and gradient for 'spatial only' MALA
target.and.grad.spatial(
Gamma,
nis,
cellarea,
rootQeigs,
invrootQeigs,
mu,
spatial,
logspat,
scaleconst,
gradtrunc
)
current state of the chain, Gamma
matrix of cell counts
area of cells, a positive number
square root of the eigenvectors of the precision matrix
inverse square root of the eigenvectors of the precision matrix
parameter of the latent Gaussian field
spatial at risk function, lambda, interpolated onto correct grid
log of spatial at risk function, lambda*scaleconst, interpolated onto correct grid
the expected number of cases
gradient truncation parameter
the back-transformed Y, its exponential, the log-target and gradient for use in MALAlgcpSpatial