matthewwolak / nadiv

R package that constructs (non)additive genetic relationship matrices, and their inverses, from a pedigree to be used in linear mixed effect models (A.K.A. the 'animal model').
17 stars 7 forks source link

likelihood ratio test signs #4

Closed matthewwolak closed 8 years ago

matthewwolak commented 9 years ago

constrainFun.R, proLik.R and plot.proLik.R all need to be checked so that consistency of calculations from log-likelihood ratio tests is upheld when log-likelihoods are both negative as well as both positive.

May require some idiosyncracies with asreml-R

plot.proLik.R currently does not display a red line for the 1-alpha CI, because the sign of output from pchisq() does not match the sign of the outcome of the LRT. Reproducible example is in the plot.proLik.Rd examples!

matthewwolak commented 8 years ago

A more serious issue was noticed in that the confidence limits were not being calculated correctly. This was merely a problem with consistency in the sign of the likelihood ratio test statistic. Fixed with commit 978ad610198398848d97e90c4eb57f4834a4c278