class_docstr: Test multivariate.py.
  Tested against the R package MVN.
docstr: Test function multivariate_ttest.
  Tested against the R package Hotelling and real-statistics.com.
code: def test_multivariate_ttest(self):
      """Test function multivariate_ttest.
      Tested against the R package Hotelling and real-statistics.com.
      """
      np.random.seed(123)
      # With 2 variables
      mean, cov, n = [4, 6], [[1, 0.5], [0.5, 1]], 30
      Z = np.random.multivariate_normal(mean, cov, n)
      # One-sample test
      multivariate_ttest(Z, Y=None, paired=False)
      multivariate_ttest(Z, Y=[4, 5], paired=False)
      # With 3 variables
      # Two-sample independent
      stats = multivariate_ttest(X, Y)
      assert round(stats.at["hotelling", "F"], 3) == 1.327
      assert stats.at["hotelling", "df1"] == 3
      assert stats.at["hotelling", "df2"] == 32
      assert round(stats.loc["hotelling", "pval"], 3) == 0.283
      # Paired test with NaN values
      stats = multivariate_ttest(X_na, Y, paired=True)
      assert stats.at["hotelling", "df1"] == 3
      assert stats.at["hotelling", "df2"] == X.shape[0] - 1 - X.shape[1]
  
file_path: pingouin/pingouin/tests/test_multivariate.py
imports: import numpy
  import pandas
  from sklearn import datasets
  from unittest import TestCase
  from pingouin import read_dataset
  from pingouin.multivariate import multivariate_normality, multivariate_ttest, box_m
label_desc: Use image node_id 2 for calling the TestMultivariate obj's underlying member method code with example usage: obj.test_multivariate_ttest() without return types