• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daniel1noble / BACE / 43308362020
89%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2026 09:18PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2026 09:14PM UTC coverage: 88.674% (-0.03%) from 88.699%
43308362020

push

github

daniel1noble
Draw phylogenetic effects through Cholesky, not eigen (1.0.3)

The trait simulator produced different data on different machines from the
same seed. Suite 2029 pass / 0 fail / 0 error; R CMD check 0/0/0.

THE SYMPTOM. Same seed, same scenario, three machines:

  Accelerate (macOS)   x1[1:3] = 7.169  -1.485  0.273   lambda 0.827
  OpenBLAS   (Linux)   x1[1:3] = 2.047  -1.537  2.636   lambda 0.875
  AOCL       (Linux)   x1[1:3] = 4.074  -1.417  4.599   lambda 0.850

WHAT ISOLATED IT. On all three, these were IDENTICAL: runif(), sample(), the
tree down to its total branch length, the tip labels, and which cells were
hidden. Only the traits differed. That ruled out the RNG, the tree build and
the missingness, and pointed at the single step between random numbers and
traits.

THE CAUSE. sample_random_effects() used MASS::mvrnorm(), which builds its
matrix square root from eigen(Sigma, symmetric = TRUE). A matrix has many
valid square roots -- eigenvector signs are arbitrary and LAPACK fixes no
convention, and for repeated eigenvalues the whole subspace is free. Each
library made a different, equally valid choice, so three machines reshaped the
same random numbers three different ways.

Reproduced on one machine: negating half the eigenvector columns turned -0.92
into +0.97 with the spread unchanged. It also explains why a 3x3 test looked
fine -- the freedom only shows at realistic size.

THE FIX. Draw through the Cholesky factor, which is unique for a
positive-definite matrix, so implementations agree to rounding error instead of
choosing. A near-degenerate matrix gets a deterministic ridge, never an eigen
fallback -- that would reintroduce exactly this.

VERIFIED BEFORE ACCEPTING:
  * distribution unchanged -- 4,000 draws recover the requested variance and
    the tree's correlation structure;
  * imputation no worse -- accuracy against known truth is statistically
    identical, mean r 0.510 vs 0.528 over 30 seeds, p = 0.85. An early 8-seed
    check sug... (continued)

13 of 16 new or added lines in 1 file covered. (81.25%)

4682 of 5280 relevant lines covered (88.67%)

1451.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
87.02
-0.55% R/simulate_auxiliary.r
Jobs
ID Job ID Ran Files Coverage
1 43308362020.1 12 Nov 2026 09:18PM UTC 21
88.67
GitHub Action Run
Source Files on build 43308362020
  • Tree
  • List 21
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43308362020
  • 32872570 on github
  • Prev Build on main (#43133836787)
  • Next Build on main (#43546315838)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc