amices / mice

Multivariate Imputation by Chained Equations
https://amices.org/mice/
GNU General Public License v2.0
424 stars 106 forks source link

Fix test for trivial `minpuc` argument in `quickpred` #634

Closed stephematician closed 2 months ago

stephematician commented 3 months ago

Use any(minpuc != 0) which supports scalar, vector, and matrix in the short-circuit test for trivial minpuc.

Added tests that check that the basic types for each argument (as documented) are supported. Also added a test to check that the return value is as per documentation (square, binary matrix).

stephematician commented 3 months ago
  1. No idea why ubuntu-latest is failing at the dependency action.
  2. On my machine, another test fails:

    ── Failed tests ─────────────────────────────────────────────────────────────── Failure (test-parlmice.R:15:3): Imputations are equal between mice and parlmice complete(C, "long") not identical to complete(D, "long"). Component “bmi”: Mean relative difference: 0.1664327 Component “hyp”: Mean relative difference: 0.6666667 Component “chl”: Mean relative difference: 0.1966936

    [ FAIL 1 | WARN 0 | SKIP 0 | PASS 383 ]

stephematician commented 3 months ago

Removing Matrix extra dependency in R-CMD-check does (seem to) fix the workflow.

stefvanbuuren commented 2 months ago

Thanks!