'Return endog and exog for imputation of a given variable.
Parameters
vname : string
The variable for which the split data is returned.
Returns
endog_obs : DataFrame
Observed values of the variable to be imputed.
exog_obs : DataFrame
Current values of the predictors where the variable to be
imputed is observed.
exog_miss : DataFrame
Current values of the predictors where the variable to be
Imputed is missing.
init_kwds : dict-like
The init keyword arguments for `vname`, processed through Patsy
as required.
fit_kwds : dict-like
The fit keyword arguments for `vname`, processed through Patsy
as required.'

def get_split_data(self, vname):

    formula = self.conditional_formula[vname]
    (endog, exog) = patsy.dmatrices(formula, self.data, return_type='dataframe')
    ixo = self.ix_obs[vname]
    endog_obs = np.asarray(endog.iloc[ixo])
    exog_obs = np.asarray(exog.iloc[ixo, :])
    ixm = self.ix_miss[vname]
    exog_miss = np.asarray(exog.iloc[ixm, :])
    predict_obs_kwds = {}
    if (vname in self.predict_kwds):
        kwds = self.predict_kwds[vname]
        predict_obs_kwds = self._process_kwds(kwds, ixo)
    predict_miss_kwds = {}
    if (vname in self.predict_kwds):
        kwds = self.predict_kwds[vname]
        predict_miss_kwds = self._process_kwds(kwds, ixo)
    return (endog_obs, exog_obs, exog_miss, predict_obs_kwds, predict_miss_kwds)
