Open dpsanders opened 6 years ago
invcdf
is more intuitive / discoverable (from a discussion on Slack)
invcdf
is more intuitive / discoverable
It depends on your training. I think most people with a stats background will look for the quantile function.
OK, but I had no idea to look for the quantile function...
FWIW I've never heard of invcdf
until now and wouldn't think it use it when I'm looking for quantiles.
It's the inverse function of the CDF.
Right, I get from the name what it is, I've just never seen that terminology used in this context.
@ararslan The names invcdf
, invccdf
, invlogcdf
and invlogccdf
are used throughout the https://github.com/JuliaStats/StatsFuns.jl sources in preference to quantile
and variations. For one thing it is easier to compound "inverse", "complementary" and "log" to create a meaningful name. "Complementary quantile" doesn't parse the same as "inverse complementary cdf".
I believe the invcdf
is used in part within the GLM framework (link functions, canonical links) and less so in more general statistics which use quantile. I think is fine to have it aliased and used for the code as @dmbates mentioned, but use quantile as the default for the API.
I don't see the harm in offering the alias, since at least some people are familiar with the term (including me). The docstring would still call it quantile
.
I was just going to open a similar issue, I was looking for the inverse of the cdf and wrote code along the lines of
invfun(::Normal) = StatsFuns.norminvcdf
invfun(::Gamma) = StatsFuns.gammainvcdf
invfun(::Poisson) = StatsFuns.poisinvcdf
invfun(::TDist) = StatsFuns.tdistinvcdf
invfun(::Beta) = StatsFuns.betainvcdf
invfun(x) = nothing
before I figured out it was called quantile
:P
I know I'm late for this issue but I'm also more used to invcdf (Mathematica calls it so) than quantile. What does actually go against having an alias?
If you don't add it to the code. Could you at least add it to the documentation? A reminder to the reader that invcdf function is the same as quantile function
Compare https://github.com/JuliaStats/Distributions.jl/issues/489