Genentech / jmpost

https://genentech.github.io/jmpost/
17 stars 4 forks source link

Improve Stan `if_lt0_else` function #348

Closed gowerc closed 5 months ago

gowerc commented 5 months ago

This function as currently implemented is very confusing:

if_lt0_else(time, psi_phi, 0)

In its current implementation if time < 0 then the second argument is used where as if time >= 0 then the 3rd argument is used. Generally I would have thought you'd expect the second argument to be used if the condition in the name of the function is true but thats not the case here. Might need renaming or some other tweak to make it clear what it is doing.