[GenABEL-dev] Tolerance level in GenABEL RUnit test
L.C. Karssen
lennart at karssen.org
Fri May 8 15:26:55 CEST 2015
Dear list,
I just ran the unit tests in GenABEL's /insts/unitTests/ directory and
get the following error:
1 Test Suite :
GenABEL unit testing - 21 test functions, 0 errors, 1 failure
FAILURE in test.polylik: Error in checkEquals(h2htNew$h2an$est,
h2htOld$h2an$est, tolerance = tol) :
Mean relative difference: 8.295007e-05
Error:
unit testing failed (#test failures: 1, #R errors: 0)
This is a test in the runit.polylik.R file. The variable "tol" is set to
2*.Machine$double.eps^0.5, which is equal to 2.980232e-08 on my
machine. As you can see the difference in the unit test is more than
three orders of magnitude higher.
The two variables that are compared are calculated like this:
h2htOld <- polygenic(formula,kin=gkin,df,llfun="polylik")
h2htNew <- polygenic(formula,kin=gkin,df,llfun="polylik_eigen")
Since I'm not an expert on the finer details of the various functions
used in polygenic() I was hoping one of you could enlighten me and tell
me if we should expect the comparison to give a difference of order 1e-8
or that 1e-4 is good enough.
Thanks for your help,
Lennart.
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands
lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20150508/c31d17d2/attachment.sig>
More information about the genabel-devel
mailing list