SPB Git

spb/metrika Public

Stata-class statistics, GPU-accelerated by Apple Silicon. Native Swift — no Electron, no Python runtime, no compromises.

Swift 92.4% HTML 3.3% R 3% Shell 1.3%

History of MetrikaKit/Tests/MetrikaKitTests/PermuteTests.swift · clear filter

  1. feat(stats): permutation tests and single-variable graphics
    - ZQResampling.permutationIndices: permutation as argsort of 64-bit
      Philox keys — order-free and counter-addressable so a future GPU
      argsort path reproduces it exactly; dedicated stream offset (bit 63,
      applied after word expansion) keeps permutations disjoint from
      bootstrap draws under the same seed
    - engine: 'permute, reps(#) [seed(#)]: reg …' — permutes the response
      within the estimation sample, parallel chunked refits, empirical
      two-sided p per coefficient (c, reps, p, SE(p)); degenerate _cons row
      omitted
    - planner: GPU heuristic restricted to bootstrap until the permute
      argsort path lands
    - graphics: standalone histogram/scatter/kdensity verbs; single-variable
      histogram (Sturges default, bins() option) and Epanechnikov kdensity
      with Silverman bandwidth (density integrates to 1 in tests)
    - 81 tests green (swift test and xcodebuild with GPU suites)
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    simon-pierre boucher committed 6 days ago (Aug 5, 2026) · 1 file changed +115