Hi,
I tried comparing R's Pearson product-moment correlation result with Alteryx's. I find a difference in the values. Can someone clarify the reason for the difference?
Dataset: mpg.csv (attached)
mpgmatrix (attached)
R code:
cor(mpgmatrix$mpg, mpgmatrix$weight, method="pearson")
(find correlation between mpg and weight)
R result:
cor
-0.9892536
Alteryx result:
-0.83
| ||||||||||||
|
Solved! Go to Solution.
I am seeing the same result using the dataset that you provided with both the association analysis tool and the R tool within alteryx, reading the data in as doubles. Would you mind sharing your completed R script? I have attached my workflow to this post as well.
I just ran the same code in RStudio and got the same value so it would appear that Alteryx and RStudio are matching