class_docstr: Class to handle multiple one-sample mixed effects models
      
docstr: Applies one step of an EM algorithm to estimate self.mean_, self.var
  
  Parameters
  ----------
  Y, array of shape (n_samples, n_tests) or (n_samples)
        the estimated effects
  V1, array of shape (n_samples, n_tests) or (n_samples)
           first-level variance
docstr_tok: ["Applies","one","step","of","an","EM","algorithm","to","estimate","self.mean_",",","self.var","Parameters","--","--","--","--","--","Y",",","array","of","shape","(","n_samples",",","n_tests",")","or","(","n_samples",")","the","estimated","effects","V1",",","array","of","shape","(","n_samples",",","n_tests",")","or","(","n_samples",")","first-level","variance"]
code: def _one_step(self, Y, V1):
      """Applies one step of an EM algorithm to estimate self.mean_, self.var
  
      Parameters
      ----------
      Y, array of shape (n_samples, n_tests) or (n_samples)
            the estimated effects
      V1, array of shape (n_samples, n_tests) or (n_samples)
               first-level variance
      """
      # E step
      prec = 1.0 / (self.V2 + V1)
      Y_ = prec * (self.V2 * Y + V1 * self.Y_)
      cvar = V1 * self.V2 * prec
  
      # M step
      self.beta_ = np.dot(self.pinv_X, Y_)
      self.Y_ = np.dot(self.X, self.beta_)
      self.V2 = np.mean((Y_ - self.Y_) ** 2, 0) + cvar.mean(0)
  
file_path: nipy/nipy/algorithms/statistics/mixed_effects_stat.py
imports: import numpy
label_desc: Use image node_id 5 for calling the MixedEffectsModel obj's underlying member method code with example usage: obj._one_step(Y, V1) without return types