code: def two_sample_ftest(Y, V1, group, n_iter=5, verbose=False):
      """Returns the mixed effects t-stat for each row of the X
      (one sample test)
      This uses the Formula in Roche et al., NeuroImage 2007
  
      Parameters
      ----------
      Y: array of shape (n_samples, n_tests)
         the data
      V1: array of shape (n_samples, n_tests)
          first-level variance associated with the data
      group: array of shape (n_samples)
         a vector of indicators yielding the samples membership
      n_iter: int, optional,
             number of iterations of the EM algorithm
      verbose: bool, optional, verbosity mode
  
      Returns
      -------
      tstat: array of shape (n_tests),
             statistical values obtained from the likelihood ratio test
      """
      # check that group is correct
      if group.size != Y.shape[0]:
          raise ValueError(
              "The number of labels is not the number of samples"
          )
      if (np.unique(group) != np.array([0, 1])).all():
          raise ValueError(
              "group should be composed only of zeros and ones"
          )
  
      # create design matrices
      X = np.vstack((np.ones_like(group), group)).T
      return mfx_stat(
          Y,
          V1,
          X,
          1,
          n_iter=n_iter,
          verbose=verbose,
          return_t=False,
          return_f=True,
      )[0]
  
file_path: nipy/nipy/algorithms/statistics/mixed_effects_stat.py
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: two_sample_ftest(Y, V1, group, n_iter, verbose) and returns: mfx_stat