You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find it confusing that lambda returns λ when type_lambda = 'all' and type_lambda = 'last', but returns log(λ) for type_lambda = 'stochastic'. I suggest adding a logical argument log that allows the user to toggle between these scales. Given the function name lambda, I think it would be most natural to set log = FALSE as the default.
The text was updated successfully, but these errors were encountered:
You're right about standard usage of the log scale. It just surprised me that the same function returned values a different scale by default. I think I'm tying the function name, lambda, to the linear scale (vs. log_lambda). Moreover, it's not always easy to immediately identify the scale based on the returned value (e.g., log(2.5)=0.92).
I see three options:
prioritize standard usage: this is the current behaviour
prioritize consistency: always report lambda on the linear scale (here, log_lambda could optionally be added as a function that wraps lambda)
prioritize explicit choice: add a boolean argument for log that defaults to TRUE if stochastic model, else FALSE (i.e., mirroring the current behaviour). However, when log = TRUE by default, return an informative warning: log lambda is returned for stochastic models; set 'log = FALSE' for lambda on linear scale. This preserves the existing behaviour, but gives the user more information about how to interpret the output. The warning could be suppressed simply by explicitly setting the log argument.
I find it confusing that
lambda
returns λ whentype_lambda = 'all'
andtype_lambda = 'last'
, but returns log(λ) fortype_lambda = 'stochastic'
. I suggest adding a logical argumentlog
that allows the user to toggle between these scales. Given the function namelambda
, I think it would be most natural to setlog = FALSE
as the default.The text was updated successfully, but these errors were encountered: