correlations in R
0
0
Entering edit mode
20 months ago

I read a spreadsheet with 59 columns and 50 rows into R studio and ask for correlations. I get a tibble with r-values. All good so far. Then I picked two of the columns and ran them and I get a different r-value. Its obviously the very same sheet and numbers. Any idea why I get different results?

cor R • 621 views
ADD COMMENT
1
Entering edit mode

Established packages are unlikely to make errors in calculating a simple thing such as correlation coefficients. Chances are that something is different in how you are asking for these values to be calculated, but impossible to tell without the code and program output.

ADD REPLY
2
Entering edit mode

That's what I thought too and I checked again. Turns out my mistake was using the default for the lo of 50 and asking for Spearman when I did the pair. Silly thing, beginners mistake, but that's what I am.

ADD REPLY

Login before adding your answer.

Traffic: 2572 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6