From m@rk@ch@ppell @ending from zoho@com  Wed Jan  9 03:10:26 2019
From: m@rk@ch@ppell @ending from zoho@com (mark.chappell)
Date: Wed, 09 Jan 2019 13:10:26 +1100
Subject: [Rd] Bug in dt() function in stats - accuracy only 6 dp.
In-Reply-To: <168301b928b.e9668824246620.3977017311338014196@zoho.com>
References: <168301b928b.e9668824246620.3977017311338014196@zoho.com>
Message-ID: <168306009c1.cfa68936250531.4734375789261380744@zoho.com>

Hi



I believe the dt() function in stats has small areas of inaccuracy.



SmallRangeMostDetaileddf150.png shows this occurring in the 10-11th decimal place.



MyD4 is computed using Myt_NC(), at the bottom of BugL.R - my function is very slow due to using mpfr, but i believe

accurate to the accuracy of genhypergeo() which it uses - 14-15 dp.



LargeRangeDiffdf150.png, which is difference between dt() and my function, shows spikes across -1.5 < x < 1.5.



I assumed probably only a problem for large df, but SmallRangeCloseZerodf20.png, shows actually more of a problem with

df = 20.? Accuracy seems to be only to 6 decimal places.



Using R version 3.5.2.



Cheers



Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmallRangeMostDetaileddf150.png
Type: image/png
Size: 1262560 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190109/20c85cda/attachment-0003.png>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: LargeRangeDiffdf150.png
Type: image/png
Size: 1262560 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190109/20c85cda/attachment-0004.png>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmallRangeCloseZerodf20.png
Type: image/png
Size: 1262560 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190109/20c85cda/attachment-0005.png>


[Rd] Bug in dt() function in stats - accuracy only 6 dp.
mark.chappell