glm
, which differ more often than expected due to poor or lack of convergence...density..
deprecation warning in vignette plot.README.md
upgraded links from http to httpsroxygen2
.Authors@R
.NEWS.md
slightly to improve its automatic parsing.delta_deviance_lf
.lfa::read.bed
has been deprecated in favor of genio::read_plink
and BEDMatrix
objects.README.md
, including corrections to examples.README.md
: only had GCATest paper link, now has full citation and also full LFA citation.inst/CITATION
: didn't exist! Now includes both LFA and GCATest papers.LICENSE.md
.1:x
with seq_len(x)
several functions.reformatR
and otherwise match Bioconductor guidelines.delta_deviance_lf
debugged case where either LF0
or LF1
is a column matrix.
Previously these 1-column matrices were getting dropped to a vector incorrectly, which resulted in the mysterious error message "Error: argument is of length zero".
This 1-column case is not typically observed in gcatest
, but is common in the reverse-dependent jackstraw
package.delta_deviance_lf
, which calculates the delta deviance from two logistic models and the genotype matrix data.
This function is a more general version of gcat.stat
(which uses the new function internally), to essentially consider models that differ by more than one degree of freedom.
It was written in particular for an external application in mind, namely the jackstraw
package.assoc_snp
was renamed to delta_deviance_snp_lf
and its last argument changed to match that of delta_deviance_lf
(alternative logistic factors instead of trait).stats::glm
.delta_deviance_snp
) now returns NA
instead of stopping when an "impossible" case is encountered (when the genotype x
is non-zero but the fitted probabilities under either null or alternative model are zero, or the alternative allele dosage (x-2
) has the same problem).
These cases are clearly model fitting failures, and can arise for common ill-defined problems, particularly under binary adjustment
variables passed to gcat
together with rare variants; these individual cases are not handled any better by stats::glm
, so it seemed most sensible to return NA
at such loci and not stop.Major overhaul from last version (1.3.2, last updated 2016-10-06).
Visible differences are support for BEDMatrix and fewer cases in which association p-values are NA
.
Internally there was major code restructuring, and added unit tests for all functions.
User-facing changes: Functions gcat
/gcatest
/gcat.stat
X
.
m
is very large, so it enables analysis of larger datasets.NA
or NaN
and are no longer missing.
NaN
deviances when their correct contribution was instead zero (because the limit of p*log(p)
as p
goes to zero is zero, not 0 * (-Inf) = NaN
).NA
and NaN
cases are avoided in the lfa
function af_snp
(fixed in lfa 2.0.0.9000, 2020-09-18) used to estimate the individual-specific allele frequencies used here to compute the delta deviance.
However, in rare cases the logistic regression in af_snp
fails to converge or there are other problems, resulting in NA
values propagated to GCATest's test statistic and p-values.delta_deviance_snp
) is more numerically-stable than before.Internal changes
.gitignore
files from another project.testthat
.assoc
C code
lfa::af_snp
, which is now called in all cases instead.assoc_snp
R codeR CMD check
requirements.