In reply to Rick Wicklin.

Excellent explanation of why not to use IFN as an attempt to avoid out-of-domain errors.

In the interest of completeness, it seems the logX = ifn(x>0, log(abs(x)), .) approach could still pose an issue for the special case of x = 0. We could use a second IFN to get around that snag, such as logX = ifn(x>0, log(ifn(x>0, x, 1)), .), but this just reinforces how much more efficient and readable the IF-THEN/ELSE alternative is.