Multi-level fitting

mlfit mlfit-package

mlfit: Iterative Proportional Fitting Algorithms for Nested Structures

toy_example()

Access to toy examples bundled in this package

ml_problem() is_ml_problem() format(<ml_problem>) print(<ml_problem>) special_field_names()

Create an instance of a fitting problem

flatten_ml_fit_problem() as_flat_ml_fit_problem()

Return a flattened representation of a multi-level fitting problem instance

ml_fit() is_ml_fit() format(<ml_fit>) print(<ml_fit>) ml_fit_dss() ml_fit_entropy_o() ml_fit_hipf() ml_fit_ipu()

Estimate weights for a fitting problem

Replication

ml_replicate()

Replicate records in a reference sample based on its fitted weights

compute_margins() margin_to_df()

Compute margins for a weighting of a multi-level fitting problem

Generalized raking

dss()

Calibrate sample weights

gginv()

Generalized Inverse of a Matrix using a custom tolerance or SVD implementation