Statistics function incorrectly computing median
Ben Abbott
bpabbott at mac.com
Mon Jan 28 11:03:53 CST 2008
On Monday, January 28, 2008, at 07:57AM, "Miguel Garcia-Blanco" <miguel.01 at ihug.com.au> wrote:
>> Thanks Miguel, you script was very helpful.
>>
>> I've modified the algorithm to be consistent with the other cases, and
>> the results remain consistent with yours.
>>
>> I've attached the three new functions (__quantile__.m, quantile.m, &
>> prctile.m), as well as the modified statistics.m.
>>
>> If there are no other problems, I'll generate a patch.
>>
>> Ben
>
>My tests (20 samples, 8 observations) indicate that quantile.m is working
>fine (and hence, presumably the others are fine too). For the continuous
>quantiles I couldn't get strict equality with R (due to rounding errors), so
>I checked the results using 'norm( q_oct - q_r )', which was never higher
>than 1.5E-5.
>
>Well done!
>
>-Miguel
Great!
I'll put together the patch later today.
Ben
More information about the Bug-octave
mailing list