Problem(s) finding p-values for numerous spearman correlations
This post was updated on .
ETA: Oh gosh, I think I might have posted this in the wrong sub-thread. I'm new to the mailing-list type site, and was a little confused. Apologies! I've (hopefully!) fixed it now.
I am very, very new to R, and I'm trying to work out the p-values for
thousands of spearman correlation scores.
Essentially, I have imported a large dataset from a CSV file (366 obs. of
73775 variables) into R Studio. Along the x-axis, I have a series of words,
the y-axis contains dates, and the data is the relative frequencies of each
of the words on that particular date. Essentially, I am trying to see if the
frequency of any/all of the given words increases significantly over the
course of a year.
After some trial and error (and a lot of Googling!), I have a code which
successfully stores the Spearman Correlation values in a matrix:
x <- my_data[1:73775]
y <- my_data
corrs3 <- round(cor(x, y, method = "spearman", use="complete.obs"), 3)
This code stores the words in one column of the matrix and their Spearman
value in the second column However, what I need to do now is to calculate
the corresponding p-values for each of the variables. I have been able to
this for individual variables by running the following code (although I do
get a warning saying "Cannot compute exact p-value with ties", but I've been
told that this isn't a major problem?):