Unlike predict, there is no performance overhead resulting from function calls, because each Stan code block expression is called only once per model anyway. Converting these expressions back to functions would make debugging easier and the blocks would also be evaluated by covr.
However, it is annoying to have many functions with the exact same arguments. I suggest we create one "function template" with the full list of arguments, and manually copy these arguments to all of the other functions using formals in a loop.
Unlike
predict
, there is no performance overhead resulting from function calls, because each Stan code block expression is called only once per model anyway. Converting these expressions back to functions would make debugging easier and the blocks would also be evaluated bycovr
.However, it is annoying to have many functions with the exact same arguments. I suggest we create one "function template" with the full list of arguments, and manually copy these arguments to all of the other functions using
formals
in a loop.