Open
Description
Based on my reading of the below code, if you set bayesian = TRUE
and method = "kendall"
then you get routed to .cor_test_bayes(method = "kendall")
from L256 of cor_test()
and then method = "pearson"
on L24 of cor_test_bayes()
without ever rank-transforming the data. Unless I am missing something, this is just calculating Pearson correlations on the untransformed data and calling them Kendall's tau correlations.
Lines 233 to 268 in 73471db
correlation/R/cor_test_bayes.R
Lines 16 to 26 in 73471db
Example:
correlation::correlation(mtcars[, 1:3], bayesian = TRUE, method = "kendall")
#> # Correlation Matrix (kendall-method)
#>
#> Parameter1 | Parameter2 | rho | 95% CI | pd | % in ROPE | BF | Prior
#> --------------------------------------------------------------------------------------------------
#> mpg | cyl | -0.80 | [-0.90, -0.64] | 100%*** | 0% | > 1000*** | Beta (3 +- 3)
#> mpg | disp | -0.79 | [-0.90, -0.65] | 100%*** | 0% | > 1000*** | Beta (3 +- 3)
#> cyl | disp | 0.86 | [ 0.74, 0.93] | 100%*** | 0% | > 1000*** | Beta (3 +- 3)
#>
#> Observations: 32
Created on 2021-12-20 by the reprex package (v2.0.1)