Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
ordinalcorr documentation
ordinalcorr documentation

Contents:

  • User Guide
  • API Reference
Back to top
View this page

ordinalcorr documentation¶

Installation¶

pip install ordinalcorr

Example¶

Compute correlation coefficient between two ordinal variables

from ordinalcorr import polychoric_corr
x = [1, 1, 2, 2, 3, 3]
y = [0, 0, 0, 1, 1, 1]
rho = polychoric_corr(x, y)
print(f"Polychoric correlation: {rho:.3f}")

Table of Contents¶

Contents:

  • User Guide
    • Method Selection Guide
  • API Reference
    • polychoric_corr()
    • polyserial_corr()
Next
User Guide
Copyright © 2025, Masayoshi Mita
Made with Sphinx and @pradyunsg's Furo
On this page
  • ordinalcorr documentation
    • Installation
    • Example
    • Table of Contents