We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are two issues here:
p_adjust = "none"
library(WRS2) library(tidyverse) library(correlation) correlation(select(msleep, bodywt, sleep_rem), winsorize = 0.2) #> # Correlation table (pearson-method) #> #> Parameter1 | Parameter2 | r | 95% CI | t(59) | p #> ------------------------------------------------------------------ #> bodywt | sleep_rem | -0.37 | [-0.57, -0.14] | -3.10 | 0.003** #> #> p-value adjustment method: Holm (1979) #> Observations: 61 correlation(keep(.x = msleep, .p = is_bare_numeric), winsorize = 0.2, p_adjust = "none") %>% filter(Parameter1 == "sleep_rem", Parameter2 == "bodywt") #> # Correlation table (pearson-method) #> #> Parameter1 | Parameter2 | r | 95% CI | t(28) | p #> --------------------------------------------------------------- #> sleep_rem | bodywt | -0.35 | [-0.63, 0.01] | -1.97 | 0.059 #> #> p-value adjustment method: none #> Observations: 30
Created on 2021-03-19 by the reprex package (v1.0.0)
The text was updated successfully, but these errors were encountered:
Hmm, seems to be due to how NA's are being omitted. The number of observations for the first test is 61, while 30 for the second one.
NA
correlation/R/cor_test.R
Line 163 in 9766bcd
Sorry, something went wrong.
With the PR:
library(WRS2) library(tidyverse) library(correlation) correlation(select(msleep, bodywt, sleep_rem), winsorize = 0.2) #> # Correlation Matrix (pearson-method) #> #> Parameter1 | Parameter2 | r | 95% CI | t(59) | p #> ------------------------------------------------------------------ #> bodywt | sleep_rem | -0.37 | [-0.57, -0.14] | -3.10 | < .01** #> #> p-value adjustment method: Holm (1979) #> Observations: 61 correlation(keep(.x = msleep, .p = is_bare_numeric), winsorize = 0.2, p_adjust = "none") %>% filter(Parameter1 == "sleep_rem", Parameter2 == "bodywt") #> # Correlation Matrix (pearson-method) #> #> Parameter1 | Parameter2 | r | 95% CI | t(59) | p #> ------------------------------------------------------------------ #> sleep_rem | bodywt | -0.37 | [-0.57, -0.14] | -3.10 | < .01** #> #> p-value adjustment method: none #> Observations: 61
d443e6d
No branches or pull requests
There are two issues here:
p_adjust = "none"
doesn't do anythingCreated on 2021-03-19 by the reprex package (v1.0.0)
The text was updated successfully, but these errors were encountered: