docstr: Use a PMM-like procedure for initial imputed values.
  
  For each variable, missing values are imputed as the observed
  value that is closest to the mean over all observed values.
docstr_tok: ["Use","a","PMM-like","procedure","for","initial","imputed","values",".","For","each","variable",",","missing","values","are","imputed","as","the","observed","value","that","is","closest","to","the","mean","over","all","observed","values","."]
code: def _initial_imputation(self):
      """
      Use a PMM-like procedure for initial imputed values.
  
      For each variable, missing values are imputed as the observed
      value that is closest to the mean over all observed values.
      """
      # Changed for pandas 2.0 copy-on-write behavior to use a single
      # in-place fill
      imp_values = {}
      for col in self.data.columns:
          di = self.data[col] - self.data[col].mean()
          di = np.abs(di)
          ix = di.idxmin()
          imp_values[col] = self.data[col].loc[ix]
      self.data.fillna(imp_values, inplace=True)
  
imports: import pandas
  import numpy
  import patsy
  from statsmodels.base.model import LikelihoodModelResults
  from statsmodels.regression.linear_model import OLS
  from collections import defaultdict
label_desc: Use image node_id 3 for calling the MICEData obj's underlying member method code with example usage: obj._initial_imputation() without return types