bartz.mcmcstep.DiagWishart

class bartz.mcmcstep.DiagWishart(nu, rate, value)[source]

A diagonal precision matrix with independent chi-square diagonal entries.

Despite the name this is not a Wishart restricted to diagonal matrices, but a convenience type: a diagonal precision whose entries are mutually independent, each with its own Gamma (scaled chi-square) prior. Only the multivariate (matrix) case is supported.

A component with rate 0 has no prior; its precision is held fixed at its value (1 for the binary components of a mixed regression).

Used for mixed binary-continuous regression and for continuous multivariate regression with per-datapoint missingness.

nu: Float32[Array, ''] | None

Degrees of freedom of the Wishart prior, or None if there is no prior.

rate: Float32[Array, ''] | Float32[Array, 'k k'] | None

The rate matrix of the Wishart prior (scalar for univariate), or None if there is no prior. Equal to the inverse-gamma scale in the univariate case.

value: Float32[Array, '*chains k k'] | Float32[Array, '*chains']

The precision matrix (scalar for univariate).