logPosterior_SPDE: logPosterior_SPDE function

View source: R/log_posteriors_and_derivatives_SPDE.R

logPosterior_SPDER Documentation

logPosterior_SPDE function

Description

A function to evaluate the log-posterior of a spatial parametric proportional hazards model. Not intended for general use.

Usage

logPosterior_SPDE(
  surv,
  X,
  beta,
  omega,
  eta,
  gamma,
  priors,
  cov.model,
  u,
  control,
  gradient = FALSE,
  hessian = FALSE
)

Arguments

surv

an object of class Surv

X

the design matrix, containing covariate information

beta

parameter beta

omega

parameter omega

eta

parameter eta

gamma

parameter gamma

priors

the priors, an object of class 'mcmcPriors'

cov.model

the spatial covariance model

u

vector of interpoint distances

control

a list containg various control parameters for the MCMC and post-processing routines

gradient

logical whether to evaluate the gradient

hessian

logical whether to evaluate the Hessian

Value

evaluates the log-posterior and the gradient and hessian, if required.

References

  1. Benjamin M. Taylor and Barry S. Rowlingson (2017). spatsurv: An R Package for Bayesian Inference with Spatial Survival Models. Journal of Statistical Software, 77(4), 1-32, doi:10.18637/jss.v077.i04.

  2. Finn Lindgren, Havard Rue, Johan Lindstrom. An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach. Journal of the Royal Statistical Society: Series B 73(4)


spatsurv documentation built on Oct. 19, 2023, 9:07 a.m.