Re: [Jprogramming] Interquartile range

2021-02-22 Thread Hauke Rehr
I see. Duplication always raises the question if one wants to keep up with changes and have some people dedicated to mirroring changes to be reflected from upstream original library. It’s a maintenance issue. If one doesn’t then why not develop independently to start with, without constraints. If

Re: [Jprogramming] Interquartile range

2021-02-22 Thread Emir U
Hey Hauke, I think writing to files and running processes is not an uncommon way to interface with GNU Plot/GPLK because they have their own DSLs and therefore support text intermediaries. Obs. not GNU Scientific. Point is moreso that I'd want to be able to work with J data types, seamlessly cal

Re: [Jprogramming] Interquartile range

2021-02-22 Thread Hauke Rehr
I thought that’s the way the julia interfaces to both gnuplot and gnu scientific work like. They should send raw data to a process rather than writing to files – don’t they? And both R and python would disappoint me as well if they didn’t do so. But maybe I misunderstood what exact kind of differen

Re: [Jprogramming] Interquartile range

2021-02-22 Thread Emir U
Thanks Mike, I'm a J neophyte so take this with a pinch of salt. I think that the best way to make J relevant for statistics is well thought through deep bindings to the following libraries: GNU Plot, GNU Scientific. Not clunky write to a file then run it in the background type stuff, but well t

Re: [Jprogramming] Interquartile range

2021-02-22 Thread 'Michael Day' via Programming
Thanks for bringing this to attention. In https://mathworld.wolfram.com/Quantile.html Eric Weisstein lists 9 different quantile implementations. Back in the 90s there was a project to establish a library of stats functions in APL. One result was a useful Maximum Likelihood model workspace,  bu

Re: [Jprogramming] Interquartile range

2021-02-21 Thread Brian Schott
The manual method I learned is captured in the following formula. load'stats/base' midpt -:@<:@# median -:@(+/)@((<. , >.)@midpt { /:~) iqr=:((median@{.~-@>.@midpt)-(median@{.~>.@midpt))@/:~ -- (B=) -- For informat

Re: [Jprogramming] Interquartile range

2021-02-21 Thread 'Bo Jacoby' via Programming
For summarizing a data set use En=: 4 : 0 NB. tombola-resume y=.x*(+/%#)(,y)^/1+i.x e=.1 for_i. 1+i.x do.    e=.e,~i%~+/(_1^i.i)*e*i{.y end. _1&x:|.->{:p. e ) The function 1&En is the mean value. 2&En is the mean value plus or minus the standard deviation. 3&En is 3 numbers summarizing the da

Re: [Jprogramming] Interquartile range

2021-02-21 Thread Raul Miller
It's perhaps worth noting that these do not always yield the same result: q2 5 7 11 13 6 q3 5 7 11 13 4 FYI, -- Raul On Sun, Feb 21, 2021 at 6:10 PM xash wrote: > > Without I.: > q2=: (1r4 3r4 <.@* #) -/@:{ \:~ > > And a fun one: > q3=: \:~ -&({~ # <.@% 4:) /:~ > ---

Re: [Jprogramming] Interquartile range

2021-02-21 Thread xash
Without I.: q2=: (1r4 3r4 <.@* #) -/@:{ \:~ And a fun one: q3=: \:~ -&({~ # <.@% 4:) /:~ -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Interquartile range

2021-02-21 Thread Hauke Rehr
Directly derived from your version: q=: 3 : '(-/@:{~ 3r4 1r4 I.~ #\ % #) /:~y' Didn’t test it, though. Am 21.02.21 um 22:19 schrieb Emir U: > q=: 3 : '-/(((1+ i. #y) % #y) I. 0.75 0.25) {/:~y' -- -- mail written using NEO neo-layout.org -

[Jprogramming] Interquartile range

2021-02-21 Thread Emir U
I couldn't find this in the archive so here is an attempt at a fairly simple interquartile range function for those who might be looking for it. iqr=: 3 : 0 q=: 3 : '-/(((1+ i. #y) % #y) I. 0.75 0.25) {/:~y' q "1 |: y ) Pretty certain it can be written much more concisely: just not by me righ