SyntheticDifferenceInDifferences.algorithm#
- SyntheticDifferenceInDifferences.algorithm()[source]#
Run the SDiD algorithm: fit weight modules, compute tau analytically.
The method is a thin orchestrator that delegates each step to a private helper so that the individual pieces can be unit tested in isolation:
_build_weight_fitter_inputs()prepares the dict-basedX,yandcoordsinputs for the weight fitter.PyMCModel.fit()fits both the omega and lambda modules via MCMC._extract_weight_posteriors()pulls the posterior weight arrays out of the fitted model._compute_synthetic_and_gaps()builds the synthetic control trajectory and the gap between treated and synthetic._compute_tau()evaluates the double-difference ATT._build_reporting_objects()constructs the xarray objects required by the reporting helpers.
- Return type:
None