Studentized Range Distribution?

question

#1

I may be missing it, but does Distributions.jl contain the q (Studentized range) distribution? This is the one used for post-hoc multiple comparisons. Defined by degrees of freedom (nu) and number of comparisons (k).


#2

There is no implementation of Studentized Range in Distributions.jl. However, I manged to implement Studentized Range in Julia last semester while taking a stats class, and I can share the code with you if you like. There are a few issues with it that prevented me from submitting a full pull request to Distributions.jl, however.

Here are some pictures that reproduce the Wikipedia Studentized Range figures so that you can see that it works.

Studentized%20Range%20Test Studentized%20Range%20Test2

The code is not particularly performant. You’re looking at 0.008 seconds on average to compute a cdf, 0.01 seconds for a pdf, and a very slow 0.4 seconds on average to compute a quantile (if I recall correctly, you need the quantile to perform relevant statistical tests). If that’s ok with with you, let me know and I’ll send you the file!


#3

That would be awesome! I’m interested in it for my SimpleANOVA.jl package for the posthoc tests, if that would be okay with you, with credit as you see fit.

I’m guessing most usage would be interactive and just need the ccdf, so that performance is probably okay. Alternative would be hardcoding values from a table and interpolating, and I’m not too excited about doing that. :slight_smile:


#4

Have fun!

I’m not worried about credit. The powers that be in my research field (separations for molten salt reactors) would probably not care much that I implemented a statistical distribution in Julia.