Compute a differentiable box prior
constraintExp2(p, mu, sigma = 1, k = 0.05, fixed = NULL)
Named numeric, the parameter value
Named numeric, the prior values, means of boxes
Named numeric, half box width
Named numeric, shape of box; if 0 a quadratic prior is obtained, the higher k the more box shape, gradient at border of the box (-sigma, sigma) is equal to sigma*k
Named numeric with fixed parameter values (contribute to the prior value but not to gradient and Hessian)
list with entries: value (numeric, the weighted residual sum of squares),
gradient (numeric, gradient) and
hessian (matrix of type numeric). Object of class objlist
.