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%
-
feat(stats): logit/probit/poisson MLE, tabulate, correlate
…
- ZQGLM: Fisher-scoring IRLS through the LAPACK QR path (X'WX never formed), converged to |Δll| < 1e-13; classical, robust (HC0 score sandwich, Stata ML convention), and cluster (G/(G−1)) VCE; LR/Wald chi2, McFadden pseudo-R²; information matrix re-evaluated at the converged beta (R's vcov carries last-iteration weights and is only ~1e-6-accurate by its own stopping rule — fixtures compute expected information at the optimum explicitly) - Distributions: regularized incomplete gamma, chi-square CDF/p-value, normal quantile - ZQCorrelate: Pearson matrix on listwise-complete data - Engine: logit/probit/poisson tables (z, P>|z|, LR chi2, pseudo R²), one-way and two-way tabulate with totals, Stata-style lower-triangle correlate - Fixtures: binomial/poisson outcomes drawn after existing draws (earlier golden values bit-identical); glm at epsilon 1e-12 - 56 tests green (12 new) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
-
feat: bootstrap Metrika v0.1 skeleton with working ZQL vertical slice
…
- MetrikaKit SPM package: ZQParser, ZQPlanner, ZQEngine, ZQData, ZQStats, ZQGPU, ZQGraphics, ZQPlugins (Swift 6, strict concurrency) - ZQL parser: lexer, Pratt expressions, factor variables, prefix commands, column-cited errors with Levenshtein verb suggestions - ZQData: DuckDB-backed load/save (parquet, csv, json, arrow) - ZQStats: OLS via LAPACK QR, HC0-HC3 and cluster-robust SE, summarize, t/F distributions accurate in the far tails - ZQGPU: Philox4x32-10 reference RNG, counter-addressable bootstrap - ZQEngine: session actor with use/save/gen/replace/drop/keep/summarize/ regress/count/list/graph/bootstrap/set seed/xtset/log - SwiftUI app (xcodegen): console with history, variables sidebar, Swift Charts plots; sandboxed + hardened runtime entitlements - Tests: 44 green (parser golden, R fixtures at 1e-10, Philox KAT, end-to-end engine); Tests/Fixtures/generate.R; Tests/Bench harness - scripts: check_headers.sh + pre-commit hook, make_icns.sh, release.sh Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>