On Aug 11, 2007, at 9:04 PM, Anand Patil wrote:
def half_normal_like(x, tau):
r"""
half_normal_like(x, tau)
Half-normal log-likelihood, a normal distribution with mean 0 and limited
to the domain :math:`x \in [0, \Infty)`.
.. math::
f(x \mid \tau) = \sqrt{\frac{2\tau}{\pi}}\exp\left\{ {\frac{-x^2 \tau}{2}}\right\}
:Parameters:
x : float
:math:`x \ge 0`
tau : float
:math:`\tau > 0`
"""
# try:
# constrain(tau, lower=0)
# constrain(x, lower=0, allow_equal=True)
# except ZeroProbability:
# return -Inf
return flib.hnormal(x, tau)