smartcor: Intelligent Correlation Method Selection for Mixed Variable Types
Abstract
Pearson correlation is the default measure of association in most statistical software, yet it is only appropriate for pairs of continuous variables with a linear relationship. When variables are binary, ordinal, or categorical, specialized methods (e.g., point-biserial, polychoric, tetrachoric, and Cramér's~) may be more appropriate, but practitioners rarely know which to select. The \textbf{smartcor} package for \textbf{R} (and its companion \textbf{pysmartcor} package for \textbf{Python}) automatically detects variable types, selects the statistically appropriate correlation method for each pair, and explains its reasoning. The package supports 14~correlation and association methods covering all 10~variable-type pair combinations, and distinguishes true correlation (for ordinal and continuous pairs) from statistical association (for nominal categorical pairs). Monte~Carlo simulations validate the selection logic, and a case study with General Social Survey data demonstrates substantive differences between naive and type-aware correlation analysis.
Create a lesson
Metadata
- Categories
- stat.ME, stat.CO
- Comments
- 38 pages, 7 figures
Related papers
An association measure for mixed-type variables
Shared title terminologystat.MEYongjae Kim, Haeun Moon, Sungkyu Jung
BADGERS: Bayesian Adaptive Graph-Guided Errors-in-Variables Regression Solution for Structured High-Dimensional Data
Shared title terminologystat.MEZeyu Hu, Kewen Qu, Qi Long et al.
Regression calibration for logistic regression with correlated measurement error and multiple misclassification in covariates
Shared title terminologystat.MEZhiqiang Cao, Man Yu Wong
Partial Identification under Imperfect Compliance via Cross-World Correlation Restriction
Shared title terminologystat.MEZhaoqing Tian, Lin Liu, Yue Liu et al.
Model Selection and Averaging: Signal Strength, Ordering, and Oracle Risks
Shared title terminologystat.MEGuangyuan Cui, Yuhong Yang
Correlation-aware sequential sampling for multi-output polynomial chaos expansions
Shared title terminologystat.MEQitian Lu, Miroslav Vořechovský, Lukáš Novák