Validation register¶
Each row is one test that checks an estimator or function against something outside pymetrix: a library, another program's recorded output, a published table, a closed form, a hand calculation or recovery from simulation. The validation page describes the kinds of reference and the tolerances. "Default" tolerance is NumPy's allclose (relative 1e-5, absolute 1e-8). The extras are what the test needs beyond the core install (pip install pymetrix[...]); "test only" libraries are references, not dependencies.
270 checks of 213 estimators and functions; 10 public estimators have no outside reference yet (rows with reference "none").
| Estimator or function | Reference | What is compared | Tolerance | Test | Extras |
|---|---|---|---|---|---|
acd |
arch GARCH on the square roots of the durations | parameters and log likelihood | 1e-10 | tests/test_count_series.py::test_exponential_acd_is_garch_on_the_square_roots |
arch |
ach |
hand loop (the likelihood) and recovery from simulation | log likelihood; parameters | 1e-10 | tests/test_ach.py::test_the_likelihood_by_a_loop_and_recovery |
|
anderson_rubin |
hand calculation (F test of the instruments in the reduced form) | statistic and p-value | 1e-10 | tests/test_gmm_flavours.py::test_anderson_rubin_by_hand |
|
anderson_rubin_set |
the Anderson-Rubin and Stock-Wright statistics at each grid point, computed directly | confidence set and statistics | 1e-10 | tests/test_gmm_flavours.py::test_the_anderson_rubin_set_and_stock_wright |
|
APARCH |
arch arch_model (wrapped) | parameters and standard errors | default | tests/test_arch.py::test_arch_backed_models_match_arch |
arch |
ARDL |
statsmodels ARDL; the long run by hand | coefficients, standard errors, long-run multipliers | 1e-8 | tests/test_ardl.py::test_matches_statsmodels_and_the_long_run_by_hand |
|
arfima |
the residual variance by hand and recovery | sigma^2; d and AR within 3 s.e. | 1e-12 | tests/test_spectral.py::test_arfima |
|
ARMA |
gretl exact ML (recorded) | coefficients, log likelihood, standard errors | 1e-5 (s.e. 1e-3) | tests/reference/test_reference.py::test_arma_against_gretl |
|
ARMA |
arch ARX with GARCH | parameters and log likelihood | 1e-4 | tests/test_arma_garch.py::test_ar_errors_with_garch_match_arch |
arch |
backtest |
none | refits an estimator over windows: checked only against the estimator fitted on each window (tests/test_forecast_evaluation.py::test_rolling_windows_estimate_on_the_last_periods) | |||
bacon_decomposition |
linearmodels PanelOLS (two-way fixed effects) | weights and estimates that add to the TWFE estimate | 1e-10 | tests/test_staggered.py::test_the_bacon_decomposition |
panel |
Bagging |
hand bootstrap aggregation with statsmodels OLS | predictions | 1e-8 | tests/test_sklearn_plugin.py::test_bagging_by_hand |
ml |
bai_perron |
recovery from simulation | break dates and their number | a few periods | tests/test_breaks.py::test_bai_perron_recovers_two_breaks_and_chooses_their_number |
|
BaxterKing |
statsmodels hpfilter, bkfilter, cffilter | trends and cycles | default | tests/test_filters.py::test_match_statsmodels |
|
Bayes |
closed form (normal-inverse-gamma posterior) | posterior means and standard deviations | Monte Carlo error | tests/test_bayes_equation.py::test_normal_priors_against_the_exact_posterior |
|
Between |
statsmodels OLS on entity means | coefficients | default | tests/test_linearmodels.py::test_between_is_ols_on_entity_means_and_clustering |
panel |
Between |
linearmodels RandomEffects, BetweenOLS, FirstDifferenceOLS, FamaMacBeth (wrapped) | coefficients and standard errors | default | tests/test_linearmodels.py::test_panel_estimators_match_linearmodels |
panel |
bilinear |
hand loop (the bilinear recursion) and recovery | residuals and estimates | 1e-10 | tests/test_threshold_var_bilinear_bhhh.py::test_bilinear |
|
binary_scores |
hand calculation | Brier and log scores, hit rates | default | tests/test_forecast_evaluation.py::test_binary_scores_by_hand |
|
BMA |
hand enumeration with statsmodels OLS | posterior model probabilities, coefficients, inclusion | 1e-9 | tests/test_bma.py::test_posteriors_coefficients_and_inclusion_by_hand |
|
Bridge |
hand calculation (quarterly averages and OLS) | bridge nowcasts | 1e-10 | tests/test_nowcast.py::test_bridge_equations |
|
Bridge |
statsmodels OLS | standard errors | 1e-10 | tests/test_nowcast_uncertainty.py::test_the_bridges_standard_error_is_ols_with_nothing_filled |
|
BVARSV |
least squares (a loose prior), and the median of the drawn responses | coefficients and impulse responses | 0.08 (responses 1e-12) | tests/test_bvar_sv.py::test_coefficients_and_responses |
|
c_test |
linearmodels IVGMM C statistic, and by hand | difference-in-Sargan statistic | 1e-8 | tests/test_gmm_flavours.py::test_c_test_against_linearmodels |
panel |
causal_forest |
closed form (the doubly robust scores averaged by hand) | average effect and its standard error | 1e-12 | tests/test_causal_forest.py::test_the_average_effects_are_the_doubly_robust_scores |
ml |
causal_forest |
recovery from simulation | conditional effects and interval coverage | RMSE 0.35 | tests/test_causal_forest.py::test_the_forest_finds_the_step_in_the_effect_and_its_intervals_cover |
ml |
cce |
statsmodels OLS by entity, averaged by hand | coefficients and standard errors | 1e-10 | tests/test_panel_time_series.py::test_mean_group_and_cce_by_hand |
|
chain_link |
hand calculation of the IMF QNA Manual 2017 (ch. 8) annual-overlap, one-quarter-overlap and over-the-year chain-linking formulas | chain-linked volumes and their discrepancy | 1e-10 | tests/test_indexnumbers.py::test_chain_linking_by_hand |
|
chain_link |
published (IMF QNA Manual 2017, Examples 8.6 and 8.7: annual-overlap and one-quarter-overlap chain-linking) | chain volumes, chain indices and discrepancies, quarterly and annual | half the last printed digit (0.05; 0.005 for indices) | tests/test_qna_manual_examples.py::test_chain_link_reproduces_examples_8_6_and_8_7 |
|
choice_logit |
statsmodels MNLogit | coefficients, standard errors, log likelihood | 1e-6 | tests/test_clogit_effects.py::test_anes96_party_identification_against_statsmodels_mnlogit |
|
choice_logit |
hand likelihood | log likelihood and gradient | 1e-8 | tests/test_conditional_logit.py::test_choice_model_against_its_likelihood_by_hand |
|
choice_margins |
hand calculation | probabilities and effects at a profile | 1e-10 | tests/test_choice_margins.py::test_at_a_profile_by_hand |
|
choose_threshold |
brute-force search of the definitions (KLR 1998, Sarlin 2013, Youden 1950) | chosen threshold and trade-off | exact | tests/test_signals.py::test_choose_threshold_by_brute_force |
|
ChristianoFitzgerald |
statsmodels hpfilter, bkfilter, cffilter | trends and cycles | default | tests/test_filters.py::test_match_statsmodels |
|
Classical |
statsmodels STL, seasonal_decompose | components under every setting | 1e-12 | tests/test_seasonal.py::test_every_stl_and_classical_setting_reaches_statsmodels |
|
classification_table |
hand calculation; statsmodels proportion_confint (wilson) | rates, Wilson intervals, noise-to-signal, odds ratio and usefulness | 1e-12 | tests/test_signals.py::test_classification_table_by_hand |
|
clogit_effects |
closed-form effects and finite differences | marginal effects and elasticities | 1e-10 | tests/test_clogit_effects.py::test_effects_at_the_means_by_the_formulas_and_finite_differences |
|
CLogLog |
statsmodels GLM (binomial, cloglog link) | coefficients, standard errors, log likelihood | 1e-8 | tests/test_cloglog.py::test_binary_matches_statsmodels_glm |
|
Cluster |
statsmodels OLS (two-way cluster) | coefficients and two-way clustered standard errors | 1e-8 | tests/test_crosschecks.py::test_two_way_cluster_covariance |
|
Cluster |
statsmodels OLS (cluster covariance) | clustered standard errors | default | tests/test_estimation.py::test_cluster_matches_statsmodels |
|
CochraneOrcutt |
statsmodels GLSAR | coefficients, rho, standard errors | 1e-10 (s.e. 1e-9) | tests/test_regression_extras.py::test_cochrane_orcutt_against_glsar |
|
cointegrating_regression |
arch DynamicOLS, FullyModifiedOLS, CanonicalCointegratingReg | coefficients and standard errors | 1e-10 | tests/test_cointegrating_regression.py::test_against_arch |
arch |
combine_forecasts |
hand calculation | combination weights and forecasts | 1e-9 | tests/test_forecast_evaluation.py::test_combination_weights_by_hand |
|
compare |
statsmodels compare_lr_test | likelihood-ratio statistic, df and p-value | 1e-10 (p 1e-8) | tests/test_crosschecks.py::test_likelihood_ratio_test |
|
compare_solutions |
none | collects solutions side by side: checked only against the solutions given (tests/test_sweeps.py) | |||
ComponentBridge |
closed form (the Fisher ideal quantity index, computed by hand) | chained aggregate growth with deflators | 1e-12 | tests/test_nowcast_components.py::test_chained_with_deflators |
|
conditional_logit |
statsmodels ConditionalLogit | coefficients and standard errors | 1e-6 | tests/test_conditional_logit.py::test_panel_against_statsmodels |
|
conformal |
MAPIE | intervals | 1e-10 | tests/test_conformal.py::test_against_mapie |
ml; test only: mapie |
conformal |
hand calculation | intervals | 1e-12 | tests/test_conformal.py::test_split_conformal_by_hand |
|
contributions_to_growth |
hand calculation (BEA Fisher contributions, Reinsdorf, Diewert and Ehemann 2002; IMF QNA Manual 2017 annual-overlap contributions) | contributions adding up to the growth | 1e-12 | tests/test_indexnumbers.py::test_contributions_by_hand |
|
cox_ph |
published and statsmodels PHReg | coefficients and standard errors | 5e-4 (published), 1e-12 (statsmodels) | tests/test_survival.py::test_cox_published_and_statsmodels |
|
cox_ph |
statsmodels PHReg, SurvfuncRight | estimates with entry times, strata and clusters | 1e-12 | tests/test_survival.py::test_entry_strata_and_clusters_against_statsmodels |
|
cox_survival_curves |
statsmodels PHReg baseline cumulative hazard (Breslow) | baseline hazard and survival curves | 1e-12 | tests/test_survival_completion.py::test_cox_curves_baseline_is_statsmodels_breslow_hazard |
|
cox_test |
statsmodels compare_j_test, compare_cox | statistics and p-values | 1e-10 (p 1e-8) | tests/test_regression_extras.py::test_non_nested_against_statsmodels |
|
cross_spectrum |
closed form (known gain and coherence of a filtered series) | gain and coherence | 0.02 | tests/test_spectral.py::test_coherence_and_gain |
|
cumulative_incidence |
the Aalen-Johansen variance formula by hand loops | cumulative incidence and its variance | 1e-13 | tests/test_survival_completion.py::test_cumulative_incidence_variance_by_its_formula |
|
deflate |
hand calculation (nominal x 100 / price index; 100 nominal / real) | real values and the deflator | 1e-12 | tests/test_indexnumbers.py::test_deflate_by_hand |
|
did |
statsmodels WLS (weighted two-way fixed effects) | estimate | 1e-10 | tests/test_synthdid.py::test_the_weighted_twfe_identity_and_did |
|
did |
recovery from simulation (the policy_panel example, true effect 2) | leads near zero, lags near the true effect | 3 s.e. | tests/test_treatment.py::test_the_policy_panel_and_its_event_study |
|
did |
hand calculation (difference of means) | estimate | 1e-10 | tests/test_treatment.py::test_twfe_is_the_difference_in_differences_of_means |
|
diebold_mariano |
scipy.stats t-test of the loss differential; the small-sample factor by its formula | statistic and p-value | default | tests/test_forecasting.py::test_diebold_mariano |
|
diffusion |
closed form (the exact CIR transition density) | log likelihood and estimates | 1e-10 | tests/test_diffusion.py::test_cir |
|
dml_sensitivity |
DoubleML sensitivity_analysis | bounds and robustness values | 1e-8 | tests/test_double_ml.py::test_sensitivity_against_the_doubleml_package |
ml; test only: doubleml |
double_ml |
DoubleML DoubleMLPLR | estimate and standard error | 1e-8 | tests/test_double_ml.py::test_against_the_doubleml_package |
ml; test only: doubleml |
double_ml |
hand loop over the folds | estimate and standard error | 1e-12 | tests/test_double_ml.py::test_cross_fitted_plr_by_hand |
|
double_ml |
DoubleML (IV type, two-way clusters) | estimate and standard error | 1e-10 | tests/test_double_ml.py::test_iv_type_and_two_way_against_the_doubleml_package |
ml; test only: doubleml |
duration_model |
statsmodels Poisson with a log-time offset | coefficients and standard errors | 1e-8 | tests/test_survival_completion.py::test_exponential_is_poisson_with_an_offset |
|
duration_model |
scipy.stats fit and closed forms | Weibull, log-normal, log-logistic parameters | 1e-9 | tests/test_survival_completion.py::test_uncensored_fits_against_scipy_stats |
|
DynamicFactor |
statsmodels DynamicFactorMQ | log likelihood, parameters and nowcasts | 1e-8 | tests/test_nowcast.py::test_the_dynamic_factor_model_is_statsmodels |
|
early_warning |
the pieces it is made of (roc_analysis, choose_threshold, roc_test) and lead times counted by hand on the simulated crisis panel | ranking, thresholds, lead times | 1e-12 | tests/test_signals.py::test_early_warning_on_the_crisis_panel |
|
efficient_method_of_moments |
statsmodels ARIMA maximum likelihood | MA(1) estimates | 1.5 s.e. | tests/test_simulation_estimators.py::test_ma1_by_indirect_inference_and_emm_near_ml |
|
EGARCH |
arch arch_model (wrapped) | parameters and standard errors | default | tests/test_arch.py::test_arch_backed_models_match_arch |
arch |
ElasticNet |
the optimality (KKT) conditions | coefficients | 1e-7 | tests/test_sklearn_plugin.py::test_lasso_and_elastic_net_meet_their_optimality_conditions |
ml |
Equation |
scipy.optimize.curve_fit | nonlinear least-squares coefficients and standard errors | 1e-6 (s.e. 1e-4) | tests/test_crosschecks.py::test_nonlinear_least_squares_against_scipy |
|
Equation |
statsmodels OLS | coefficients, standard errors, R-squared, AIC | default | tests/test_estimation.py::test_ols_matches_statsmodels |
|
event_study |
recovery from simulation (the policy_panel example, true effect 2) | leads near zero, lags near the true effect | 3 s.e. | tests/test_treatment.py::test_the_policy_panel_and_its_event_study |
|
event_windows |
hand-built cases (Bussiere and Fratzscher 2006) | target, sample and status | exact | tests/test_signals.py::test_event_windows_by_hand |
|
ExponentialSmoothing |
hand recursion | damped-trend forecasts | 1e-8 | tests/test_ets.py::test_damped_trend_forecasts_by_hand |
|
ExponentialSmoothing |
hand recursion and the textbook variance | level, forecasts and forecast variances | 1e-9 | tests/test_ets.py::test_simple_smoothing_is_the_level_recursion_with_the_textbook_variance |
|
FactorModel |
R factanal (recorded) | loadings and uniquenesses | 1e-7 | tests/test_factor_model.py::test_factanal |
|
FamaMacBeth |
linearmodels RandomEffects, BetweenOLS, FirstDifferenceOLS, FamaMacBeth (wrapped) | coefficients and standard errors | default | tests/test_linearmodels.py::test_panel_estimators_match_linearmodels |
panel |
favar |
hand calculation (principal components and a VAR by least squares) | factors, loadings and responses | 1e-10 | tests/test_favar.py::test_factors_loadings_and_responses |
|
FIGARCH |
arch arch_model (wrapped) | parameters and standard errors | default | tests/test_arch.py::test_arch_backed_models_match_arch |
arch |
FIML |
closed form (exactly identified FIML is 2SLS) | coefficients | 1e-6 | tests/test_fiml.py::test_exactly_identified_equations_give_2sls |
|
FIML |
linearmodels IVLIML (FIML of one structural equation is LIML) | coefficients | 1e-6 | tests/test_fiml.py::test_one_structural_equation_and_the_reduced_form_give_liml |
panel |
FirstDifference |
linearmodels RandomEffects, BetweenOLS, FirstDifferenceOLS, FamaMacBeth (wrapped) | coefficients and standard errors | default | tests/test_linearmodels.py::test_panel_estimators_match_linearmodels |
panel |
FirstOrder |
the linear solution's impulse responses | paths | 1e-12 | tests/test_plans.py::test_an_unanticipated_shock_is_an_impulse_response |
|
forecast_accuracy |
statsmodels OLS predictions | forecasts and accuracy measures | default | tests/test_single_equation.py::test_static_forecast_matches_statsmodels |
|
GARCH |
arch arch_model | parameters and log likelihood | 5e-4 | tests/test_arch.py::test_native_garch_agrees_with_arch |
arch |
GARCH |
arch ARX with GARCH | parameters and log likelihood | 1e-4 | tests/test_arma_garch.py::test_ar_errors_with_garch_match_arch |
arch |
garch_in_mean |
arch GARCH | parameters and log likelihood | 1e-5 | tests/test_girf_garch_m_nn.py::test_garch_without_the_in_mean_term_is_arch |
arch |
GaussSeidel |
the data the model was built from | solved paths and identities | default | tests/test_models.py::test_solve_reproduces_the_data |
|
GaussSeidel |
the joint (unblocked) solution | solved paths | 1e-10 | tests/test_solver_options.py::test_blocks_give_the_joint_solution |
|
gets |
simulation (known data-generating processes) | potency and gauge | Monte Carlo error | tests/test_gets_interventions.py::test_potency_and_gauge_on_simulated_dgps |
|
GLP |
numerical integration on a grid | posterior of the hyperparameters | Monte Carlo error | tests/test_bvar_hierarchical.py::test_mcmc_over_the_hyperparameters_matches_their_posterior_on_a_grid |
|
GMM |
linearmodels IVGMM | two-step coefficients, standard errors, J statistic | 1e-8 (s.e. 1e-6) | tests/test_gmm.py::test_two_step_gmm_matches_linearmodels |
panel |
gph |
hand regression on the log periodogram, and recovery | d estimates | 1e-10 | tests/test_spectral.py::test_gph_and_local_whittle |
|
GradientBoosting |
scikit-learn (wrapped), fitted directly | predictions under every setting | 1e-9 | tests/test_sklearn_plugin.py::test_every_learner_setting_reaches_scikit_learn |
ml |
gregory_hansen |
statsmodels adfuller on the residuals at the break chosen; recovery of the break date | ADF statistic and break date | 1e-10 | tests/test_cointegrating_regression.py::test_gregory_hansen |
arch |
growth_at_risk |
statsmodels QuantReg | quantile projections | 1e-6 | tests/test_growth_at_risk.py::test_the_projections_against_quantreg_and_by_construction |
|
Hamilton |
statsmodels OLS of y(t+h) on its lags | cycle | default | tests/test_filters.py::test_hamilton_is_a_regression |
|
hausman_mcfadden |
statsmodels MNLogit on the restricted choice set, and spec_hausman | restricted coefficients, standard errors and the statistic | 1e-6 | tests/test_iia_hausman.py::test_dropping_air_against_statsmodels |
|
Heckman |
recovery from simulation | ML coefficients, rho and sigma near the true values | 0.08 | tests/test_limited.py::test_heckman_ml_recovers_a_simulated_selection |
|
Heckman |
published (Wooldridge, MROZ) | two-step coefficients and standard errors | 5e-4 | tests/test_limited.py::test_heckman_two_step_matches_wooldridge |
|
HP |
statsmodels hpfilter on expanding samples | one-sided HP trend | 1e-8 | tests/test_crosschecks.py::test_one_sided_hp_is_the_end_point_of_expanding_two_sided_filters |
|
HP |
statsmodels hpfilter, bkfilter, cffilter | trends and cycles | default | tests/test_filters.py::test_match_statsmodels |
|
implicit_deflator |
hand calculation (nominal x 100 / price index; 100 nominal / real) | real values and the deflator | 1e-12 | tests/test_indexnumbers.py::test_deflate_by_hand |
|
inar |
the likelihood by hand and recovery from simulation | log likelihood; parameters within 3 s.e. | 1e-10 | tests/test_count_series.py::test_inar |
|
indirect_inference |
closed form (GBM) | estimates | 0.02 | tests/test_simulation_estimators.py::test_gbm_by_indirect_inference_is_the_closed_form |
|
indirect_inference |
statsmodels ARIMA maximum likelihood | MA(1) estimates | 1.5 s.e. | tests/test_simulation_estimators.py::test_ma1_by_indirect_inference_and_emm_near_ml |
|
interactive_fe |
hand loops of the bias formula | bias-corrected coefficients | 1e-10 | tests/test_interactive_fe.py::test_bias_correction_against_the_formula_with_loops |
|
interactive_fe |
recovery from simulation | coefficients | a few standard errors | tests/test_interactive_fe.py::test_recovers_beta_where_two_way_fixed_effects_fail |
|
intervention |
hand recursion | the intervention series | 1e-15 | tests/test_gets_interventions.py::test_the_decaying_pulse_is_the_hand_recursion |
|
isat |
simulation (a planted outlier and break) | dates found | exact | tests/test_gets_interventions.py::test_iis_and_sis_find_a_planted_outlier_and_break |
|
IV |
linearmodels IV2SLS (robust, not debiased) | HC0 standard errors | 1e-10 | tests/test_hc_covariances.py::test_iv_hc0_matches_linearmodels |
panel |
IV |
statsmodels IV2SLS | 2SLS coefficients and standard errors | default | tests/test_single_equation.py::test_iv_matches_statsmodels |
|
IVGMM |
linearmodels IVGMM | two-step coefficients, standard errors, J statistic | 1e-8 (s.e. 1e-6) | tests/test_gmm.py::test_two_step_gmm_matches_linearmodels |
panel |
j_test |
statsmodels compare_j_test, compare_cox | statistics and p-values | 1e-10 (p 1e-8) | tests/test_regression_extras.py::test_non_nested_against_statsmodels |
|
johansen |
statsmodels coint_johansen | trace and maximum eigenvalue statistics, eigenvalues | default | tests/test_vecm.py::test_johansen_matches_statsmodels |
|
kaplan_meier |
statsmodels PHReg, SurvfuncRight | estimates with entry times, strata and clusters | 1e-12 | tests/test_survival.py::test_entry_strata_and_clusters_against_statsmodels |
|
kaplan_meier |
published (Freireich data) and statsmodels SurvfuncRight | survival curve and standard errors | 5e-5 | tests/test_survival.py::test_freireich_published_and_statsmodels |
|
kaplan_meier |
hand product-limit formula | survival curve and Greenwood variance | 1e-15 | tests/test_survival.py::test_kaplan_meier_by_hand |
|
kde |
statsmodels KDEUnivariate | densities and bandwidths | default | tests/test_nonparametric.py::test_densities_against_statsmodels |
|
kernel_regression |
statsmodels KernelReg | fitted values | 1e-10 | tests/test_nonparametric.py::test_kernel_regression_against_kernelreg |
|
kmeans |
scikit-learn silhouette_score | silhouette | 1e-10 | tests/test_kmeans.py::test_silhouette_equals_scikit_learns |
ml |
kmeans |
scikit-learn KMeans | labels, centres and inertia | 1e-10 | tests/test_kmeans.py::test_well_separated_data_give_scikit_learns_clusters |
ml |
kmeans_k |
none | kmeans at each k: checked only against kmeans run directly (tests/test_kmeans.py::test_choosing_k) | |||
Lasso |
the optimality (KKT) conditions | coefficients | 1e-7 | tests/test_sklearn_plugin.py::test_lasso_and_elastic_net_meet_their_optimality_conditions |
ml |
LightGBM |
lightgbm (wrapped), fitted directly | predictions | 1e-12 | tests/test_boosting_learners.py::test_lightgbm_is_lightgbm |
lightgbm, ml |
LIML |
linearmodels IVLIML, IVGMM (wrapped) | coefficients and standard errors | default | tests/test_linearmodels.py::test_liml_and_gmm_match_linearmodels |
panel |
link_factor |
hand calculation (ratio and difference links at an overlap) | spliced values and the link factor | 1e-12 | tests/test_indexnumbers.py::test_splice_by_hand |
|
local_whittle |
hand regression on the log periodogram, and recovery | d estimates | 1e-10 | tests/test_spectral.py::test_gph_and_local_whittle |
|
LocalProjection |
statsmodels OLS with HAC, horizon by horizon | responses, standard errors, observations | 1e-10 (s.e. 1e-8) | tests/test_crosschecks.py::test_local_projections_are_horizon_by_horizon_ols |
|
LocalProjection |
linearmodels IV2SLS | LP-IV responses and standard errors | 1e-10 | tests/test_lp_iv.py::test_each_horizon_against_iv2sls |
panel |
Logit |
statsmodels Logit, Probit, Poisson | coefficients, standard errors, log likelihood | 1e-6 | tests/test_single_equation.py::test_ml_matches_statsmodels |
|
marginal_effects |
statsmodels get_margeff | average marginal effects and standard errors | 1e-5 (s.e. 2e-3) | tests/test_margins.py::test_against_statsmodels_get_margeff |
|
MarkovSwitching |
statsmodels MarkovRegression | log likelihood and parameters | 1e-6 (parameters 1e-4) | tests/test_markov.py::test_matches_statsmodels |
|
mean_group |
statsmodels OLS by entity, averaged by hand | coefficients and standard errors | 1e-10 | tests/test_panel_time_series.py::test_mean_group_and_cce_by_hand |
|
MIDAS |
recovery from simulation | weight parameters | 0.2 | tests/test_midas.py::test_parametric_midas_recovers_the_weights |
|
MIDAS |
statsmodels OLS | U-MIDAS coefficients | default | tests/test_midas.py::test_unrestricted_midas_is_least_squares |
|
minimum_distance |
closed form (GLS in the linear case) | estimates and standard errors | 1e-8 (s.e. 1e-6) | tests/test_gmm_flavours.py::test_minimum_distance_in_the_linear_case_is_gls |
|
Minnesota |
closed form (a loose prior gives least squares) | posterior mean | 1e-6 | tests/test_bvar.py::test_loose_prior_gives_least_squares |
|
Minnesota |
closed form (a tight prior gives the prior mean) | posterior mean | 1e-4 | tests/test_bvar.py::test_tight_prior_gives_the_prior_mean |
|
mixed_logit |
xlogit 0.2.7 (recorded) | coefficients and log likelihood | 1e-5 | tests/test_mixed_logit.py::test_against_xlogit |
|
mixed_logit |
hand calculation | conditional means and effects | 1e-12 | tests/test_mixed_logit.py::test_conditional_means_and_effects_by_hand |
|
MixedFrequencyBVAR |
the pymetrix Minnesota BVAR on monthly data (a special case) | posterior means | 0.05 | tests/test_mfbvar.py::test_monthly_only_is_the_bvar |
|
MixedFrequencyBVAR |
closed form (the conditional normal) | mean and covariance of the draws | 0.15 | tests/test_mfbvar.py::test_the_simulation_smoother_draws_the_conditional_normal |
|
ML |
statsmodels GenericLikelihoodModel | coefficients and standard errors of explicit-form likelihoods | 1e-6 (s.e. 1e-5) | tests/test_ml_explicit.py::test_nonlinear_indexes_against_statsmodels |
|
ML |
statsmodels Logit, Probit, Poisson | coefficients, standard errors, log likelihood | 1e-6 | tests/test_single_equation.py::test_ml_matches_statsmodels |
|
model_confidence_set |
arch.bootstrap SPA and MCS (wrapped), simulation | the best forecast found; provenance names arch | exact | tests/test_forecast_evaluation.py::test_spa_and_the_model_confidence_set_find_the_best_forecast |
arch |
MomentGMM |
statsmodels GMM | one-step, two-step and iterated estimates and standard errors | 1e-6 (s.e. 1e-5) | tests/test_moment_gmm.py::test_one_and_two_step_and_iterated_match_statsmodels |
|
MovingAverage |
pandas rolling mean | filtered series | default | tests/test_crosschecks.py::test_moving_average_is_pandas_rolling |
|
MSVAR |
statsmodels MarkovRegression | log likelihood, coefficients, transition probabilities | 1e-8 (coefficients 1e-3) | tests/test_ms_var.py::test_one_equation_is_statsmodels_markov_regression |
|
MSVAR |
statsmodels MarkovRegression | log likelihood and standard errors | 1e-9 (s.e. 1e-4) | tests/test_ms_var_bands.py::test_loglike_and_standard_errors_match_statsmodels |
|
Multinomial |
statsmodels MNLogit | coefficients and standard errors | 1e-4 (s.e. 2e-3) | tests/test_limited.py::test_multinomial_logit_matches_statsmodels |
|
MultiplicativeHeteroskedasticity |
the likelihood maximised directly (scipy BFGS) | coefficients, variance parameters, log likelihood | 1e-5 | tests/test_regression_extras.py::test_multiplicative_heteroskedasticity |
|
NearestNeighbours |
scikit-learn (wrapped), fitted directly | predictions under every setting | 1e-9 | tests/test_sklearn_plugin.py::test_every_learner_setting_reaches_scikit_learn |
ml |
NegativeBinomial |
statsmodels NegativeBinomial | coefficients, standard errors, log likelihood | 1e-4 (s.e. 2e-3) | tests/test_limited.py::test_negative_binomial_matches_statsmodels |
|
nested_logit |
Biogeme (recorded) | coefficients, standard errors, log likelihood | 1e-4 | tests/test_nested_logit.py::test_against_biogeme |
|
nested_logit |
hand calculation | probabilities and gradient | 1e-12 | tests/test_nested_logit.py::test_probabilities_and_gradient_by_hand |
|
NeuralNetwork |
scikit-learn (wrapped), fitted directly | predictions under every setting | 1e-9 | tests/test_sklearn_plugin.py::test_every_learner_setting_reaches_scikit_learn |
ml |
Newton |
Newton period by period on a backward-looking model | solved path | default | tests/test_forward.py::test_perfect_foresight_equals_newton_on_a_backward_model |
|
Newton |
the data the model was built from | solved paths and identities | default | tests/test_models.py::test_solve_reproduces_the_data |
|
Newton |
the joint (unblocked) solution | solved paths | 1e-10 | tests/test_solver_options.py::test_blocks_give_the_joint_solution |
|
nonparametric_autoregression |
hand kernel regression on the lags | fitted values | 1e-12 | tests/test_nonparametric.py::test_nonparametric_autoregression |
|
NormalWishart |
closed form limits (loose prior near least squares, tight near the prior) | posterior means | 0.01 | tests/test_bvar_independent.py::test_the_prior_shrinks_as_documented |
|
nowcast_backtest |
hand calculation | errors and RMSE by horizon | 1e-12 | tests/test_nowcast_backtest.py::test_rmse_by_horizon_by_hand |
|
nowcast_refresh |
none | runs nowcasts and news day by day: checked only against those run directly (tests/test_nowcast_refresh.py) | |||
nowcast_tracking |
hand calculation (the data made monthly as of each day) | tracked nowcasts | exact | tests/test_nowcast_weekly.py::test_tracking_makes_weekly_data_monthly_each_day |
|
occbin |
Dynare perfect_foresight (recorded) | simulated paths | 1e-9 | tests/test_dynare_occbin.py::test_anticipated_shocks_equal_dynare_perfect_foresight |
|
occbin |
Dynare OccBin (recorded) | simulated paths | 1e-9 | tests/test_dynare_occbin.py::test_surprises_equal_dynare_occbin |
|
occbin_filter |
the linear Kalman filter | filtered states and log likelihood | 1e-9 | tests/test_occbin_filter.py::test_a_constraint_that_never_binds_is_the_linear_filter |
|
occbin_filter |
statsmodels Kalman filter with the regimes' matrices | filtered states and log likelihood | default | tests/test_regimes_occbin.py::test_the_occbin_filter_with_regimes_and_correlations_is_statsmodels_given_the_regimes |
|
OLS |
scipy.optimize.curve_fit | nonlinear least-squares coefficients and standard errors | 1e-6 (s.e. 1e-4) | tests/test_crosschecks.py::test_nonlinear_least_squares_against_scipy |
|
OLS |
statsmodels OLS (two-way cluster) | coefficients and two-way clustered standard errors | 1e-8 | tests/test_crosschecks.py::test_two_way_cluster_covariance |
|
OLS |
statsmodels OLS (cluster covariance) | clustered standard errors | default | tests/test_estimation.py::test_cluster_matches_statsmodels |
|
OLS |
statsmodels OLS | coefficients, standard errors, R-squared, AIC | default | tests/test_estimation.py::test_ols_matches_statsmodels |
|
ols |
none | the array interface to Equation's OLS: checked only against the formula path (tests/test_ols_arrays.py::test_time_series_matches_the_formula_path) | |||
omitted_variables |
statsmodels compare_f_test, compare_lr_test | statistics and p-values | 1e-10 (p 1e-8) | tests/test_omitted_variables.py::test_matches_statsmodels_compare_tests |
|
optimal_control |
optimal policy under commitment (closed form on a linear-quadratic model) | paths | 1e-6 | tests/test_frbus_example.py::test_optimal_control_equals_commitment_on_a_linear_quadratic_model |
|
optimal_policy |
closed form | policy rules | 1e-12 | tests/test_policy.py::test_commitment_equals_the_closed_form |
|
optimal_policy |
closed form | policy rules | 1e-9 | tests/test_policy.py::test_discretion_equals_the_closed_form |
|
OrderedCLogLog |
statsmodels OrderedModel with a cloglog distribution | coefficients, cut points, standard errors | 1e-10 (s.e. 1e-5) | tests/test_cloglog.py::test_ordered_matches_statsmodels_ordered_model |
|
OrderedLogit |
statsmodels OrderedModel | coefficients, cut points, standard errors | 1e-4 | tests/test_limited.py::test_ordered_models_match_statsmodels |
|
OrderedProbit |
statsmodels OrderedModel | coefficients, cut points, standard errors | 1e-4 | tests/test_limited.py::test_ordered_models_match_statsmodels |
|
osr |
grid search | optimal coefficients and loss | 3e-3 | tests/test_policy.py::test_optimal_simple_rules_match_a_grid_search |
|
partially_linear |
Robinson's estimator by hand, and recovery | coefficients | 1e-12 | tests/test_nonparametric.py::test_partially_linear |
|
particle_filter |
the Kalman filter | filtered means | 0.15 s.d. | tests/test_particle_filter.py::test_first_order_filtered_means_match_kalman |
|
particle_filter |
a grid filter (numerical integration) | filtered means | Monte Carlo error | tests/test_particle_filter.py::test_nonlinear_measurement_against_a_grid_filter |
|
PCA |
hand SVD | factors and loadings | 1e-10 | tests/test_nowcast.py::test_principal_components_by_hand |
|
PerfectForesight |
Newton period by period on a backward-looking model | solved path | default | tests/test_forward.py::test_perfect_foresight_equals_newton_on_a_backward_model |
|
PerfectForesight |
closed form (the analytic forward solution) | solved path | 1e-10 | tests/test_forward.py::test_perfect_foresight_matches_the_analytic_forward_solution |
|
periodogram |
scipy.signal periodogram and Welch | periodogram and spectral estimates | 1e-10 | tests/test_spectral.py::test_the_periodogram_and_spectra |
|
Poisson |
statsmodels Logit, Probit, Poisson | coefficients, standard errors, log likelihood | 1e-6 | tests/test_single_equation.py::test_ml_matches_statsmodels |
|
poisson_autoregression |
the likelihood by hand and recovery from simulation | log likelihood; parameters within 3 s.e. | 1e-10 | tests/test_count_series.py::test_poisson_autoregression |
|
pooled_mean_group |
the likelihood by hand; statsmodels OLS for one entity; recovery from simulation | long-run coefficients and log likelihood | 1e-10 (one entity 1e-6) | tests/test_panel_time_series.py::test_the_pooled_mean_group |
|
PraisWinsten |
statsmodels GLS with the AR(1) covariance | coefficients and standard errors | 1e-10 (s.e. 1e-8) | tests/test_regression_extras.py::test_prais_winsten_is_gls |
|
predictive_margins |
hand calculation (predictions averaged over the sample) | predictive margins, contrasts and standard errors | 1e-10 (s.e. 1e-6) | tests/test_margins.py::test_profiles_contrasts_and_predictive_margins |
|
price_index |
hand calculation of the Laspeyres, Paasche, Fisher and Törnqvist formulas (ILO/IMF CPI Manual 2020) | fixed-base and chained price and quantity indices | 1e-12 | tests/test_indexnumbers.py::test_index_formulas_by_hand |
|
Probit |
statsmodels Logit, Probit, Poisson | coefficients, standard errors, log likelihood | 1e-6 | tests/test_single_equation.py::test_ml_matches_statsmodels |
|
Quantile |
statsmodels QuantReg | coefficients and standard errors | default | tests/test_quantile.py::test_matches_statsmodels |
|
quantile_process |
none | Quantile at a grid of quantiles: checked only against Quantile fitted at each (tests/test_dialogs_tests_forecasts.py::test_the_quantile_process) | |||
QuantileBridge |
statsmodels QuantReg | coefficients at each quantile | 1e-8 | tests/test_nowcast_quantile.py::test_each_quantile_is_quantreg |
|
QuantileVAR |
statsmodels QuantReg equation by equation | coefficients and standard errors | 1e-10 (s.e. 1e-5) | tests/test_quantile_var.py::test_equations_against_quantreg |
|
quantity_index |
hand calculation of the Laspeyres, Paasche, Fisher and Törnqvist formulas (ILO/IMF CPI Manual 2020) | fixed-base and chained price and quantity indices | 1e-12 | tests/test_indexnumbers.py::test_index_formulas_by_hand |
|
RandomEffects |
linearmodels RandomEffects, BetweenOLS, FirstDifferenceOLS, FamaMacBeth (wrapped) | coefficients and standard errors | default | tests/test_linearmodels.py::test_panel_estimators_match_linearmodels |
panel |
RandomForest |
scikit-learn (wrapped), fitted directly | predictions under every setting | 1e-9 | tests/test_sklearn_plugin.py::test_every_learner_setting_reaches_scikit_learn |
ml |
rdd |
hand weighted least squares and cross-validation | estimate and bandwidth | 1e-10 | tests/test_treatment.py::test_rd_is_weighted_least_squares_and_the_bandwidth_minimises_cv |
|
read_mod |
Dynare 6.0 (recorded), Smets-Wouters 2007 | decision rules and steady state | 1e-10 (steady state 1e-12) | tests/test_dynare_sw2007.py::test_the_decision_rules_at_the_published_mode |
|
rebase |
hand calculation (x / its average over the base x 100) | rebased values | 1e-12 | tests/test_indexnumbers.py::test_rebase_by_hand |
|
reconcile |
hand calculation (pro rata) | balanced values | 1e-12 | tests/test_disaggregation_extensions.py::test_least_squares_balancing_without_totals_is_pro_rata |
|
regime_filter |
statsmodels KalmanFilter (time-varying matrices) | filtered states and log likelihood | 1e-8 | tests/test_regimes.py::test_the_regime_filter_is_statsmodels_kalman_filter_with_the_time_varying_matrices |
|
revision_analysis |
hand calculation and statsmodels OLS | revision statistics and tests | 1e-12 | tests/test_nowcast_realtime.py::test_revision_statistics_match_a_hand_computation |
|
Ridge |
closed form | coefficients | 1e-8 | tests/test_sklearn_plugin.py::test_ridge_is_its_closed_form |
ml |
RobustLS |
statsmodels RLM | coefficients, scale and standard errors | 1e-8 | tests/test_robust_regression.py::test_against_statsmodels_rlm |
|
roc_analysis |
R pROC 1.19.1 (auc, var, ci.auc with DeLong, partial AUC with McClish's correction) | AUROC, DeLong variance and interval, partial AUC | 1e-12 | tests/test_signals.py::test_roc_analysis_matches_proc |
|
roc_analysis |
R pROC 1.19.1 ci.auc(method='bootstrap', boot.n=2000), another random stream | stratified bootstrap interval | 0.02 (Monte Carlo error) | tests/test_signals.py::test_the_bootstrap_interval_is_procs_within_monte_carlo_error |
|
roc_test |
R pROC 1.19.1 (roc.test, method delong, paired and unpaired) | statistic, df, p-value | 1e-10 | tests/test_signals.py::test_roc_test_matches_proc |
|
SARIMA |
hand recursion | forecasts and forecast variances | 1e-6 | tests/test_arima.py::test_seasonal_ar_forecasts_and_variances_by_hand |
|
SARIMA |
R arima (recorded) | coefficients and log likelihood of the airline model | as printed | tests/test_arima.py::test_the_airline_model_matches_r |
|
scenarios |
none | solves a model under several scenarios: checked only against each scenario solved directly (tests/test_sweeps.py) | |||
second_order |
closed form (a model with a known exact solution) | every second-order term | 1e-12 | tests/test_second_order.py::test_every_term_equals_the_exact_solution |
|
select_predictors |
statsmodels OLS t-tests in a loop | kept series and t statistics | 1e-10 | tests/test_nowcast_targeted.py::test_hard_thresholding_is_a_loop_of_t_tests |
|
select_predictors |
scikit-learn enet_path | selection order and coefficients | 1e-8 | tests/test_nowcast_targeted.py::test_the_elastic_net_is_scikit_learns_path |
ml |
semiparametric_garch |
arch GARCH and recovery | parameters | 2e-3 | tests/test_nonparametric.py::test_semiparametric_garch |
arch |
shap_values |
shap TreeExplainer; additivity | SHAP values | 1e-12 | tests/test_shap_values.py::test_tree_shap_for_scikit_learn_trees |
ml, shap |
shift_share |
hand loops | AKM and AKM0 standard errors and intervals | 1e-10 | tests/test_shift_share.py::test_akm_and_akm0_against_loops_on_a_tiny_example |
|
shift_share |
closed form (the shock-level IV equals the regional IV) | estimate and standard error | 1e-10 | tests/test_shift_share.py::test_bhj_shock_level_iv_equals_the_regional_iv_exactly |
|
simulated_moments |
recovery from simulation | mean and standard deviation | 0.03 | tests/test_simulation_estimators.py::test_simulated_moments_recover_a_normal |
|
SmoothTransitionAR |
recovery from simulation | parameters near the true values | a few standard errors | tests/test_smooth_transition.py::test_known_parameters_recovered |
|
SmoothTransitionAR |
least squares at fixed transition parameters (closed form) | sums of squares and coefficients | 1e-10 | tests/test_smooth_transition.py::test_the_sums_of_squares |
|
spa |
arch.bootstrap SPA and MCS (wrapped), simulation | the best forecast found; provenance names arch | exact | tests/test_forecast_evaluation.py::test_spa_and_the_model_confidence_set_find_the_best_forecast |
arch |
spatial_diagnostics |
spreg diagnostics | Moran's I and LM statistics | default | tests/test_spatial.py::test_diagnostics_against_spreg |
test only: libpysal, spreg |
spatial_regression |
spreg ML_Lag, ML_Error | coefficients, standard errors, log likelihood | 1e-6 | tests/test_spatial.py::test_against_spreg |
test only: libpysal, spreg |
spatial_regression |
hand likelihood | log likelihood | 1e-10 | tests/test_spatial.py::test_the_lag_likelihood_by_hand |
|
specification_grid |
none | fits other estimators over a grid: checked only against each cell fitted directly (tests/test_specification_sensitivity.py) | |||
spectrum |
scipy.signal periodogram and Welch | periodogram and spectral estimates | 1e-10 | tests/test_spectral.py::test_the_periodogram_and_spectra |
|
splice |
hand calculation (ratio and difference links at an overlap) | spliced values and the link factor | 1e-12 | tests/test_indexnumbers.py::test_splice_by_hand |
|
stability_mapping |
closed form (the Taylor principle) | share of determinate draws | Monte Carlo error | tests/test_stability_mapping.py::test_taylor_principle_share_in_closed_form |
|
staggered_did |
hand calculation and recovery from simulation | group-time effects | 1e-12 | tests/test_staggered.py::test_att_by_hand_and_the_effects_recovered |
|
StateSpace |
statsmodels SARIMAX | log likelihood and estimates | 1e-8 | tests/test_diffuse_loglike_convention.py::test_arima_with_a_diffuse_start_matches_sarimax |
|
STL |
statsmodels STL, seasonal_decompose | components under every setting | 1e-12 | tests/test_seasonal.py::test_every_stl_and_classical_setting_reaches_statsmodels |
|
STLForecast |
statsmodels STL and ARIMA | forecasts | 1e-10 | tests/test_arima.py::test_stl_forecasts_are_the_adjusted_forecast_plus_last_years_season |
|
StochasticFrontier |
the half-normal frontier likelihood maximised with scipy, and recovery | coefficients and variance parameters | 1e-5 | tests/test_regression_extras.py::test_the_stochastic_frontier |
|
stock_wright |
the Anderson-Rubin and Stock-Wright statistics at each grid point, computed directly | confidence set and statistics | 1e-10 | tests/test_gmm_flavours.py::test_the_anderson_rubin_set_and_stock_wright |
|
SUR |
linearmodels SUR | coefficients, standard errors, residual covariance | 1e-10 | tests/test_systems.py::test_sur_matches_linearmodels |
panel |
surveillance_heatmap |
scipy.cluster.hierarchy leaves_list | series order | exact | tests/test_surveillance_heatmap.py::test_cluster_order_is_scipys_leaves_order |
|
surveillance_heatmap |
hand calculation (z-scores, percentiles) | normalised values | 1e-12 | tests/test_surveillance_heatmap.py::test_normalised_values_by_hand |
|
sweep |
none | solves a model over parameter values: checked only against each solution computed directly (tests/test_sweeps.py) | |||
synthetic_control |
closed form (a treated unit that is an exact combination) | weights | 1e-4 | tests/test_treatment.py::test_synthetic_control_recovers_exact_weights |
|
synthetic_did |
statsmodels WLS (weighted two-way fixed effects) | estimate | 1e-10 | tests/test_synthdid.py::test_the_weighted_twfe_identity_and_did |
|
System |
linearmodels SUR | coefficients, standard errors, residual covariance | 1e-10 | tests/test_systems.py::test_sur_matches_linearmodels |
panel |
System |
linearmodels IV3SLS | coefficients and standard errors | 1e-10 | tests/test_systems.py::test_three_stage_least_squares_matches_linearmodels |
panel |
SystemOLS |
pymetrix OLS and IV equation by equation (closed-form relations) | coefficients | default | tests/test_systems.py::test_simpler_methods_and_their_relations |
|
TARCH |
arch arch_model (wrapped) | parameters and standard errors | default | tests/test_arch.py::test_arch_backed_models_match_arch |
arch |
TargetedPredictors |
none | select_predictors followed by a factor model: checked only against the two run directly (tests/test_nowcast_targeted.py::test_the_model_is_fitted_on_the_kept_series) | |||
tcode_transform |
the FRED-MD transformation formulas | transformed series | 1e-12 | tests/test_tcodes.py::test_each_code_matches_its_formula |
|
TemporalDisaggregation |
statsmodels GLS at a fixed rho | GLS-step coefficients and standard errors | default | tests/test_disaggregation.py::test_chow_lin_estimates_and_its_gls_step |
|
TemporalDisaggregation |
closed form (a proportional indicator) | the disaggregated series | 1e-9 | tests/test_disaggregation.py::test_denton_recovers_a_series_proportional_to_its_indicator |
|
TemporalDisaggregation |
published (IMF QNA Manual 2017, Example 6.2, proportional Denton) | 16 benchmarked quarters (2013 extrapolated), quarterly BI ratios, annual totals | half the last printed digit (0.05; 0.00005 for the ratios) | tests/test_qna_manual_examples.py::test_proportional_denton_reproduces_example_6_2 |
|
terasvirta |
statsmodels OLS auxiliary regressions | statistics and p-values | 1e-9 | tests/test_threshold_ar.py::test_linearity_tests |
|
Theta |
statsmodels ThetaModel | forecasts and parameters | default | tests/test_wrapper_example.py::test_theta_reproduces_statsmodels |
|
third_order |
closed form (the exact rule) | levels | 1e-11 | tests/test_third_order.py::test_levels_equal_the_exact_rule |
|
ThreeSLS |
linearmodels IV3SLS | coefficients and standard errors | 1e-10 | tests/test_systems.py::test_three_stage_least_squares_matches_linearmodels |
panel |
threshold_var |
hand calculation (least squares by regime over the threshold grid) | threshold and coefficients | 1e-10 | tests/test_threshold_var_bilinear_bhhh.py::test_the_threshold_var_by_hand |
|
ThresholdAR |
statsmodels OLS over every threshold and delay | threshold, delay, coefficients and sums of squares | 1e-10 | tests/test_threshold_ar.py::test_least_squares_over_thresholds_and_delays_by_brute_force |
|
Tobit |
published (Wooldridge, MROZ hours equation) | coefficients and standard errors as printed | 0.01 | tests/test_limited.py::test_tobit_matches_wooldridge |
|
TransferFunction |
statsmodels SARIMAX with the step as a regressor | coefficients and log likelihood | 1e-8 | tests/test_gets_interventions.py::test_a_step_with_arima_errors_is_sarimax_with_that_column |
|
treatment_effect |
closed form (subclassification) | IPW estimate | 1e-8 | tests/test_treatment.py::test_ipw_is_subclassification_with_one_binary_covariate |
|
TVPVAR |
least squares VAR (simulation) | posterior mean coefficients | 0.25 | tests/test_tvpvar.py::test_coefficients_centre_on_least_squares_and_the_dialog |
|
TwoSLS |
closed form (exactly identified FIML is 2SLS) | coefficients | 1e-6 | tests/test_fiml.py::test_exactly_identified_equations_give_2sls |
|
TwoSLS |
pymetrix OLS and IV equation by equation (closed-form relations) | coefficients | default | tests/test_systems.py::test_simpler_methods_and_their_relations |
|
UnobservedComponents |
statsmodels UnobservedComponents | log likelihood and parameters | 1e-8 | tests/test_diffuse_loglike_convention.py::test_matches_statsmodels_unobserved_components |
|
VAR |
JMulTi (recorded) | every coefficient and standard error | three printed decimals | tests/reference/test_reference.py::test_var_against_jmulti |
|
VAR |
statsmodels VAR | coefficients, standard errors, residual covariance, criteria | default | tests/test_var.py::test_estimates_match_statsmodels |
|
varma |
the residual recursion by hand; statsmodels VARMAX | residuals and log likelihood; estimates against VARMAX's exact likelihood | 1e-10 (VARMAX 0.04) | tests/test_varma.py::test_the_residuals_and_statsmodels |
|
VECM |
statsmodels VECM | alpha, beta, short-run coefficients | default | tests/test_vecm.py::test_vecm_matches_statsmodels |
|
weekly_to_monthly |
hand calculation | month-to-date means | 1e-12 | tests/test_nowcast_weekly.py::test_month_to_date_means_by_hand |
|
XGBoost |
xgboost (wrapped), fitted directly | predictions | 1e-12 | tests/test_boosting_learners.py::test_xgboost_is_xgboost |
ml, xgboost |
ZeroInflatedPoisson |
statsmodels ZeroInflatedPoisson | coefficients and standard errors | 1e-4 (s.e. 1e-3) | tests/test_limited.py::test_zero_inflated_poisson_matches_statsmodels |