class_docstr: Test correlation.py.
  
  See the test_correlation.R file.
class_docstr_tok: ["Test","correlation.py",".","See","the","test_correlation.R","file","."]
docstr: Test function rm_corr
docstr_tok: ["Test","function","rm_corr"]
code: def test_rmcorr(self):
      """Test function rm_corr"""
      df = read_dataset("rm_corr")
      # Test again rmcorr R package.
      stats = rm_corr(
          data=df, x="pH", y="PacO2", subject="Subject"
      ).round(3)
      assert stats.at["rm_corr", "r"] == -0.507
      assert stats.at["rm_corr", "dof"] == 38
      assert np.allclose(
          np.round(stats.at["rm_corr", "CI95%"], 2), [-0.71, -0.23]
      )
      assert stats.at["rm_corr", "pval"] == 0.001
      # Test with less than 3 subjects (same behavior as R package)
      with pytest.raises(ValueError):
          rm_corr(
              data=df[df["Subject"].isin([1, 2])],
              x="pH",
              y="PacO2",
              subject="Subject",
          )
  
file_path: pingouin/pingouin/tests/test_correlation.py
imports: import pytest
  import numpy
  from unittest import TestCase
  from pingouin.correlation import corr, rm_corr, partial_corr, skipped, distance_corr, bicor
  from pingouin import read_dataset
label_desc: Use image node_id 3 for calling the TestCorrelation obj's underlying member method code with example usage: obj.test_rmcorr() without return types