Soft Gamma Constraint on Positive Parameters
Arguments
- shape
Named numeric vector of shape parameters. The names select the constrained parameters.
- scale
Numeric, scalar or named and aligned with
shape, default1. The gamma scale, not the rate.- attrName
Character. Name of the attribute holding the constraint value, default
"prior".- condition
Character vector, the conditions of a sum of objectives in which the term is evaluated.
NULL(default) evaluates it in every one.
Value
An objective function of class objfn, called as
obj(pars, ...), see dModfn. The objective value is the full -2 log density.
Details
Computes the gamma prior on the -2 log scale,
$$-2(a-1)\log p + 2p/s + 2\log\Gamma(a) + 2a\log s$$
with shape \(a\) and scale \(s\). The value is Inf for a
non-positive parameter.