Multiple Imputation with Chained Equations.
This class can be used to fit most Statsmodels models to data sets with missing values using the ‘multiple imputation with chained equations’ (MICE) approach..
Parameters: | model_formula : string
model_class : statsmodels model
data : MICEData instance
n_skip : int
init_kwds : dict-like
fit_kwds : dict-like
|
---|
Examples
Run all MICE steps and obtain results:
>>> imp = mice.MICEData(data)
>>> fml = 'y ~ x1 + x2 + x3 + x4'
>>> mice = mice.MICE(fml, sm.OLS, imp)
>>> results = mice.fit(10, 10)
>>> print(results.summary())
.. rubric:: Methods
combine() | Pools MICE imputation results. |
fit([n_burnin, n_imputations]) | Fit a model using MICE. |
next_sample() | Perform one complete MICE iteration. |
Methods
combine() | Pools MICE imputation results. |
fit([n_burnin, n_imputations]) | Fit a model using MICE. |
next_sample() | Perform one complete MICE iteration. |