mcmcPriors: mcmcPriors function

View source: R/mcmcPriors.R

mcmcPriorsR Documentation

mcmcPriors function

Description

A function to define priors for the MCMC.

Usage

mcmcPriors(
  betaprior = NULL,
  omegaprior = NULL,
  etaprior = NULL,
  call = NULL,
  derivative = NULL
)

Arguments

betaprior

prior for beta, the covariate effects

omegaprior

prior for omega, the parameters of the baseline hazard

etaprior

prior for eta, the parameters of the latent field

call

function to evaluate the log-prior e.g. logindepGaussianprior

derivative

function to evaluate the first and second derivatives of the prior

Details

The package spatsurv only provides functionality for the built-in Gaussian priors. However, the choice of prior is extensible by the user by creating functions similar to the functions betapriorGauss, omegapriorGauss, etapriorGauss, indepGaussianprior and derivindepGaussianprior: the first three of which provide a mechanism for storing and retrieving the parameters of the priors; the fourth, a function for evaluating the log of the prior for a given set of parameter values; and the fifth, a function for evaluating the first and second derivatives of the log of the prior. It is assumed that parameters are a priori independent. The user interested in using other priors is encouraged to look at the structure of the five functions mentioned above.

Value

an object of class mcmcPriors

See Also

survspat, betapriorGauss, omegapriorGauss, etapriorGauss, indepGaussianprior, derivindepGaussianprior


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