Inspecting Result Objects

Notebook: tutorials/guides/04_inspecting_results.ipynb

Every solver.fit() call returns a result object that contains the ATT estimate, the fitted counterfactual panel, fit diagnostics, and estimator-specific internals (weights, fixed effects, factor matrices, etc.). This tutorial gives a complete tour of the result API using a synthetic panel with a known ground-truth ATT so every diagnostic can be interpreted directly.

Topics covered

  1. ``result.summary()`` — formatted diagnostics table covering panel info, ATT, Untreated R², Control RMSE, Pre-exposure RMSE, RMSPE ratio, and estimator-specific model internals.

  2. ``result.plot_actual_vs_counterfactual(unit)`` — interactive Plotly chart showing actual vs. counterfactual outcome for a single unit, with green treatment-period shading and a unit-level annotation box.

  3. Common attributestau, baseline, O, Z, residuals, effect_matrix, z_pattern, and all diagnostic properties.

  4. Estimator-specific attributes accessed directly on the result object:

    • DID / SDID / MC-NNMrow_fixed_effects, column_fixed_effects

    • SDIDunit_weights, time_weights

    • MC-NNMM (low-rank component), beta

    • DC-PRstd / std_tau (sandwich SE); 95 % CI construction

    • OLS SCbeta (per-unit donor weight vectors), individual_te, control_units, treatment_units

    • CovPCAU (left factor matrix, N × r)

    • RSCbaseline / M

All seven estimators are demonstrated on the same synthetic Block-treatment panel so summaries and plots can be compared side by side.

See also