Learn R Programming

mcmcsae (version 0.6.0)

pr_invchisq: Create an object containing information about inverse chi-squared priors with possibly modeled degrees of freedom and scale parameters

Description

Create an object containing information about inverse chi-squared priors with possibly modeled degrees of freedom and scale parameters

Usage

pr_invchisq(df = 1, scale = 1, n = NULL, post = FALSE)

Arguments

df

degrees of freedom parameter. This can be a numeric scalar or vector of length n, the dimension of the parameter vector. Alternatively, for a scalar degrees of freedom parameter, df="modeled" or df="modelled" assign a default (gamma) prior to the degrees of freedom parameter. For more control of this gamma prior a list can be passed with some of the following components:

alpha0

shape parameter of the gamma distribution

beta0

rate parameter of the gamma distribution

proposal

"RW" for random walk Metropolis-Hastings or "mala" for Metropolis-adjusted Langevin

tau

(starting) scale of Metropolis-Hastings update

adapt

whether to adapt the scale of the proposal distribution during burnin to achieve better acceptance rates.

scale

scalar or vector scale parameter. Alternatively, scale="modeled" or scale="modelled" puts a default chi-squared prior on the scale parameter. For more control on this chi-squared prior a list can be passed with some of the following components:

df

degrees of freedom (scalar or vector)

scale

scale (scalar or vector)

common

whether the modeled scale parameter of the inverse chi-squared distribution is (a scalar parameter) common to all n parameters.

n

dimension, if known. For internal use only.

post

whether conditional posterior sampling function should be created. For internal use only.

Value

An environment with information about the prior and possibly conditional posterior distribution(s), to be used by other package functions.