I am working with a problem that routinely needs to compute the density of the t distribution rather far in the tails in R.
For example, using R's t distribution function, dt(1.424781, 1486, -5)
returns [1] 2.75818e-10
. Some of my final outputs (using this density as an input) do not match a reference value from analogous computations performed in MATLAB by my colleague, which I think may be due to imprecision in the t distribution's tails in R.
If I compare to MATLAB's t distribution function, nctpdf(1.424781, 1486, -5)
returns ans = 4.3932e-10
, which is quite a bit different than R's output.
edit: R prints two identical warning messages
In dt(1.424781, 1486, -5) : full precision may not have been achieved
in 'pnt{final}'
This is on Mac, R version 3.3.1
dt
in question prints out a warning (two identical warnings for me): "In dt(1.424781, 1486, -5) : full precision may not have been achieved in 'pnt{final}'" This warning is present in this post on qbeta. I using openSuse 13.1 and R 3.3.1 Patched (2016-08-04 r71028). I'll perform an update right now and see if the result changes. – Gumbotil