neuropsychology / psycho.R

An R package for experimental psychologists
https://neuropsychology.github.io/psycho.R/
Other
145 stars 32 forks source link

Correlation: wrong direction intepretation (positive - negative) #55

Closed mcdussault closed 6 years ago

mcdussault commented 6 years ago

Hello Dominique!

Thanks for a cool package, the correlation functions are really good for my work. My question is regarding the r values and the printed output. I'm not sure if I'm missing something completely, but in your blog example, the r values in the table are reported as positive, but in the printed pairwise correlations the text output states it is a negative correlation.

For example, in the table Concealing and Age have a reported as -0.05 but in the printed text it is " - Age / Concealing: Results of the Pearson correlation showed a non significant and weak positive association between Age and Concealing (r(1249) = -0.050, p > .1)." And the opposite is true for Life Satisfaction and adjusting with r of 0.36 and the text stating " - Life_Satisfaction / Adjusting: Results of the Pearson correlation showed a significant and moderate negative association between Life_Satisfaction and Adjusting (r(1249) = 0.36, p < .001***)."

I'm not sure if I'm interpreting things correctly or if I have indeed been interpreting the correlations incorrectly?

Thank you for your help!

Marie

DominiqueMakowski commented 6 years ago

Hi @mcdussault, this looks like a bug indeed, thanks for reporting it, I'll look into it :)

mcdussault commented 6 years ago

Thank you!

DominiqueMakowski commented 6 years ago

@mcdussault I think it has been solved, could you update to the last github version :

install.packages("devtools")
library("devtools")
install_github("neuropsychology/psycho.R")
library("psycho")

and validate that the table and the printed output are correctly coherent? Thanks !

mcdussault commented 6 years ago

It appears to be working as it should, thank you @DominiqueMakowski !