Function Finder
Regression models, hypothesis tests, and diagnostics for in-database statistical analysis. All functions run natively in DuckDB with no external dependencies. Use aggregate functions with GROUP BY for per-group models or window functions with OVER for rolling analysis — see DuckDB Patterns for details.
Categories
DuckDB Patterns
Aggregate patterns, window functions, and predictions
_aggOVERpredictRegression
Linear, regularized, and generalized regression models
OLSRidgeGLMALM+5 moreDemand Analysis
Intermittent demand classification and anomaly detection
AIDAID AnomalyHypothesis Tests
Parametric, nonparametric, correlation, and categorical tests
t-TestANOVAChi-SquarePearson+20 moreDiagnostics
Model validation, residuals, and information criteria
VIFAICBICResidualsAll Functions
| Function | Description | SQL Signature | Category |
|---|---|---|---|
anofox_stats_ols_* | Ordinary Least Squares | anofox_stats_ols_fit(y, x, [options]) -> STRUCT | Regression |
anofox_stats_ridge_* | Ridge Regression (L2) | anofox_stats_ridge_fit(y, x, alpha, [options]) -> STRUCT | Regression |
anofox_stats_wls_* | Weighted Least Squares | anofox_stats_wls_fit(y, x, weights, [options]) -> STRUCT | Regression |
anofox_stats_rls_* | Recursive Least Squares | anofox_stats_rls_fit(y, x, [forgetting_factor]) -> STRUCT | Regression |
anofox_stats_elasticnet_* | Elastic Net (L1+L2) | anofox_stats_elasticnet_fit(y, x, alpha, l1_ratio) -> STRUCT | Regression |
anofox_stats_poisson_fit_agg | Poisson GLM | anofox_stats_poisson_fit_agg(y, x, [options]) -> STRUCT | Regression |
anofox_stats_alm_fit_agg | Augmented Linear Model | anofox_stats_alm_fit_agg(y, x, options) -> STRUCT | Regression |
anofox_stats_bls_fit_agg | Bounded Least Squares | anofox_stats_bls_fit_agg(y, x, options) -> STRUCT | Regression |
anofox_stats_nnls_fit_agg | Non-Negative Least Squares | anofox_stats_nnls_fit_agg(y, x, [options]) -> STRUCT | Regression |
anofox_stats_aid_agg | AID Classification | anofox_stats_aid_agg(y, [options]) -> STRUCT | Demand Analysis |
anofox_stats_aid_anomaly_agg | AID Anomaly Detection | anofox_stats_aid_anomaly_agg(y, [options]) -> LIST(STRUCT) | Demand Analysis |
anofox_stats_shapiro_wilk_agg | Shapiro-Wilk test | anofox_stats_shapiro_wilk_agg(value) -> STRUCT | Normality |
anofox_stats_jarque_bera_agg | Jarque-Bera test | anofox_stats_jarque_bera_agg(value) -> STRUCT | Normality |
anofox_stats_dagostino_k2_agg | D'Agostino K² test | anofox_stats_dagostino_k2_agg(value) -> STRUCT | Normality |
anofox_stats_t_test_agg | Student's t-test | anofox_stats_t_test_agg(value, group_id, [options]) -> STRUCT | Parametric |
anofox_stats_one_way_anova_agg | One-way ANOVA | anofox_stats_one_way_anova_agg(value, group_id) -> STRUCT | Parametric |
anofox_stats_yuen_agg | Yuen's trimmed mean | anofox_stats_yuen_agg(value, group_id, [options]) -> STRUCT | Parametric |
anofox_stats_brown_forsythe_agg | Brown-Forsythe test | anofox_stats_brown_forsythe_agg(value, group_id) -> STRUCT | Parametric |
anofox_stats_prop_test_one_agg | One-sample proportion | anofox_stats_prop_test_one_agg(successes, trials, p0, [options]) -> STRUCT | Parametric |
anofox_stats_prop_test_two_agg | Two-sample proportion | anofox_stats_prop_test_two_agg(successes, trials, group_id, [options]) -> STRUCT | Parametric |
anofox_stats_binom_test_agg | Binomial test | anofox_stats_binom_test_agg(successes, trials, p0, [options]) -> STRUCT | Parametric |
anofox_stats_tost_t_test_agg | TOST t-test | anofox_stats_tost_t_test_agg(value, group_id, delta, [options]) -> STRUCT | Parametric |
anofox_stats_tost_paired_agg | TOST paired | anofox_stats_tost_paired_agg(v1, v2, delta, [options]) -> STRUCT | Parametric |
anofox_stats_tost_correlation_agg | TOST correlation | anofox_stats_tost_correlation_agg(x, y, rho0, delta) -> STRUCT | Parametric |
anofox_stats_mann_whitney_u_agg | Mann-Whitney U | anofox_stats_mann_whitney_u_agg(value, group_id, [options]) -> STRUCT | Nonparametric |
anofox_stats_kruskal_wallis_agg | Kruskal-Wallis | anofox_stats_kruskal_wallis_agg(value, group_id) -> STRUCT | Nonparametric |
anofox_stats_wilcoxon_signed_rank_agg | Wilcoxon signed-rank | anofox_stats_wilcoxon_signed_rank_agg(v1, v2, [options]) -> STRUCT | Nonparametric |
anofox_stats_brunner_munzel_agg | Brunner-Munzel | anofox_stats_brunner_munzel_agg(value, group_id, [options]) -> STRUCT | Nonparametric |
anofox_stats_permutation_t_test_agg | Permutation t-test | anofox_stats_permutation_t_test_agg(value, group_id, [options]) -> STRUCT | Nonparametric |
anofox_stats_energy_distance_agg | Energy distance | anofox_stats_energy_distance_agg(value, group_id) -> STRUCT | Nonparametric |
anofox_stats_mmd_agg | Maximum Mean Discrepancy | anofox_stats_mmd_agg(value, group_id, [options]) -> STRUCT | Nonparametric |
anofox_stats_pearson_agg | Pearson correlation | anofox_stats_pearson_agg(x, y, [options]) -> STRUCT | Correlation |
anofox_stats_spearman_agg | Spearman rank | anofox_stats_spearman_agg(x, y, [options]) -> STRUCT | Correlation |
anofox_stats_kendall_agg | Kendall's tau | anofox_stats_kendall_agg(x, y, [options]) -> STRUCT | Correlation |
anofox_stats_distance_cor_agg | Distance correlation | anofox_stats_distance_cor_agg(x, y) -> STRUCT | Correlation |
anofox_stats_icc_agg | Intraclass correlation | anofox_stats_icc_agg(value, rater_id, subject_id, [options]) -> STRUCT | Correlation |
anofox_stats_chisq_test_agg | Chi-square test | anofox_stats_chisq_test_agg(row_var, col_var, [options]) -> STRUCT | Categorical |
anofox_stats_chisq_gof_agg | Chi-square GOF | anofox_stats_chisq_gof_agg(observed, expected) -> STRUCT | Categorical |
anofox_stats_g_test_agg | G-test | anofox_stats_g_test_agg(row_var, col_var) -> STRUCT | Categorical |
anofox_stats_fisher_exact_agg | Fisher's exact | anofox_stats_fisher_exact_agg(row_var, col_var, [options]) -> STRUCT | Categorical |
anofox_stats_mcnemar_agg | McNemar's test | anofox_stats_mcnemar_agg(var1, var2, [options]) -> STRUCT | Categorical |
anofox_stats_cramers_v_agg | Cramér's V | anofox_stats_cramers_v_agg(row_var, col_var) -> DOUBLE | Categorical |
anofox_stats_phi_coefficient_agg | Phi coefficient | anofox_stats_phi_coefficient_agg(row_var, col_var) -> DOUBLE | Categorical |
anofox_stats_contingency_coef_agg | Contingency coef | anofox_stats_contingency_coef_agg(row_var, col_var) -> DOUBLE | Categorical |
anofox_stats_cohen_kappa_agg | Cohen's Kappa | anofox_stats_cohen_kappa_agg(rater1, rater2) -> STRUCT | Categorical |
anofox_stats_diebold_mariano_agg | Diebold-Mariano | anofox_stats_diebold_mariano_agg(actual, f1, f2, [options]) -> STRUCT | Forecast Model Selection |
anofox_stats_clark_west_agg | Clark-West | anofox_stats_clark_west_agg(actual, f1, f2) -> STRUCT | Forecast Model Selection |
anofox_stats_vif | Variance Inflation Factor | anofox_stats_vif(x) -> LIST(DOUBLE) | Diagnostics |
anofox_stats_vif_agg | VIF (aggregate) | anofox_stats_vif_agg(x) -> LIST(DOUBLE) | Diagnostics |
anofox_stats_aic | Akaike IC | anofox_stats_aic(rss, n, k) -> DOUBLE | Diagnostics |
anofox_stats_bic | Bayesian IC | anofox_stats_bic(rss, n, k) -> DOUBLE | Diagnostics |
anofox_stats_predict | Prediction | anofox_stats_predict(x, coefficients, intercept) -> LIST(DOUBLE) | Diagnostics |
anofox_stats_residuals_diagnostics_agg | Residual analysis | anofox_stats_residuals_diagnostics_agg(y, y_hat, [x]) -> STRUCT | Diagnostics |
Showing 53 of 53