Skip to main content

Anofox Statistics

What is Anofox Statistics?

Anofox Statistics brings professional-grade statistical analysis directly to DuckDB. Build predictive models, run hypothesis tests, and validate assumptions using pure SQL - no Python overhead, no data export/import cycles.

Key Features

  • Regression Analysis - OLS, Ridge, WLS, RLS, Elastic Net with full inference
  • Hypothesis Testing - 30+ tests including t-test, ANOVA, chi-square, correlation
  • Model Diagnostics - VIF, residual analysis, normality tests, information criteria
  • Specialized Models - Poisson GLM, ALM (24 distributions), constrained optimization
  • Aggregates & Windows - GROUP BY and OVER patterns for rolling/expanding analysis
DocumentationDescription
InstallationSetup and prerequisites
Function FinderFind the right function for your task
RegressionOLS, Ridge, WLS, RLS, Elastic Net, GLM, ALM, BLS, NNLS
Demand AnalysisAID classification and anomaly detection
Hypothesis TestsParametric, nonparametric, correlation
DiagnosticsVIF, residuals, normality, model selection
DuckDB PatternsAggregates, windows, helpers

Basic Usage

-- Load the extension
LOAD anofox_statistics;

-- Fit a linear regression model
SELECT
(model).coefficients,
(model).r_squared,
(model).p_values
FROM (
SELECT anofox_stats_ols_fit_agg(
revenue,
[marketing_spend, team_size]
) as model
FROM sales_data
);

This returns coefficients with statistical significance tests, goodness-of-fit metrics, and standard errors - all computed in-database.

🍪 Cookie Settings