Soft Cauchy Constraint on Parameters
Arguments
- mu
Named numeric vector of prior locations. The names select the constrained parameters.
- sigma
Numeric, scalar or named and aligned with
mu, default1. The Cauchy scale.- 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 Cauchy prior on the -2 log scale,
$$2\log(\pi\sigma) + 2\log(1 + ((p-\mu)/\sigma)^2).$$
The heavy tails make it the tolerant alternative to constraintL2: a
parameter far from mu is pulled far more weakly than a Gaussian would
pull it.