AI 中文总结
研究针对混合变量类型选择相关方法的问题,利用smartcor包(R语言和Python)自动检测变量类型,为每对变量选择合适方法并解释,支持14种方法涵盖10种变量对组合,经模拟验证和案例研究展示了该方法优势。
AI 中文摘要
皮尔逊相关是大多数统计软件中默认的关联度量,但仅适用于具有线性关系的连续变量对。当变量为二元、有序或分类变量时,专门的方法可能更合适,但从业者很少知道如何选择。R语言的smartcor包(以及配套的Python的pysmartcor包)能自动检测变量类型,为每对变量选择统计上合适的相关方法并解释原因。该包支持14种相关和关联方法,涵盖所有10种变量类型对组合,区分了真正的相关性和统计关联性。蒙特卡罗模拟验证了选择逻辑,案例研究表明朴素和类型感知相关分析存在实质性差异。
英文摘要
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~$V$) 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.
Comments38 pages, 7 figures