Am 22.01.2015 um 09:37 schrieb Riccardo (Jack) Lucchetti:
On Thu, 22 Jan 2015, Daniel Bencik wrote:
> Allin,
>
> thanks a lot, that was the issue.
Daniel, I have no time right now to have a proper look at your cose, but
you might what to use this little trick to simplify your check; assuming
x is a series:
<hansl>
scalar check = min(x>0)
</hansl>
Also, a standard trick that "everybody" uses to ensure positive numbers
is to map your parameter with an appropriate function. So instead of
moving lambda around although it must not become negative, you directly
formulate the problem in terms of the log of lambda, which may vary
freely. In the end you back out the actual lambda by exp()-ing your
log-estimate.
-sven