-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polyserial correlations not working in correlation()
#261
Comments
Has this issue been addressed? I am also experiencing issues with the polyserial calculation using correlation(). Not sure if it is a me issue or a bug |
This issue has not yet been addressed - a major update to the package is in the works for this coming year (that will also address this issue) and all efforts are going towards that. |
Would be great to revisit this. set.seed(2024)
o <-
sample(
LETTERS[1:4],
size = 100,
replace = TRUE
) |>
factor(
levels = LETTERS[1:4],
ordered = TRUE
)
x <- rnorm(100)
d <- data.frame(o, x)
correlation::correlation(d, include_factors = TRUE, method = "auto")
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> For i = 2 j = 1 A cell entry of 0 was replaced with correct = 0.5. Check your data!
#> # Correlation Matrix (auto-method)
#>
#> Parameter1 | Parameter2 | rho | 95% CI | t(98) | p
#> -------------------------------------------------------------------------
#> o.A | o.B | -0.75 | [-0.82, -0.64] | -11.09 | < .001***
#> o.A | o.C | -0.72 | [-0.80, -0.61] | -10.32 | < .001***
#> o.A | o.D | -0.81 | [-0.87, -0.72] | -13.50 | < .001***
#> o.A | x | 0.02 | [-0.17, 0.22] | 0.24 | > .999
#> o.B | o.C | -0.59 | [-0.71, -0.45] | -7.28 | < .001***
#> o.B | o.D | -0.69 | [-0.78, -0.57] | -9.41 | < .001***
#> o.B | x | -9.54e-03 | [-0.21, 0.19] | -0.09 | > .999
#> o.C | o.D | -0.66 | [-0.76, -0.54] | -8.78 | < .001***
#> o.C | x | -0.01 | [-0.21, 0.18] | -0.12 | > .999
#> o.D | x | -6.68e-03 | [-0.20, 0.19] | -0.07 | > .999
#>
#> p-value adjustment method: Holm (1979)
#> Observations: 100
polycor::polyserial(x, o)
#> [1] -0.02025863 Created on 2024-08-15 with reprex v2.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created on 2022-09-12 by the reprex package (v2.0.1)
Session info
Less important but perhaps related, why do I need to set
include_factors=TRUE
forcorrelation()
and not forcor_test()
?The text was updated successfully, but these errors were encountered: