karoliskoncevicius / matrixTests

R package for computing multiple hypothesis tests on rows/columns of a matrix or a data.frame
https://cran.r-project.org/web/packages/matrixTests/index.html
36 stars 5 forks source link

Turn all statistic-related outputs to NA in case of warning #24

Closed karoliskoncevicius closed 3 years ago

karoliskoncevicius commented 3 years ago

Currently, when a test for a specific row cannot be executed because of special corner cases like constant values, only test statistic, p-value, and confidence intervals are turned to NA. As a result, in some situations, degrees of freedom can be still returned as 0 or even -1, and standard-error often is returned as NaN.

Better - turn all outputs computed by the test to NA, except for descriptive statistics like mean, number of observations, etc.

karoliskoncevicius commented 3 years ago

Implemented in the current dev after the following commit: https://github.com/karoliskoncevicius/matrixTests/commit/abeb70a5a9f2eaac92a8b37fda7abc322156adb5