-1

I have two data frame, one with 6 variables and one with 7 variables, I used the cor(data1,data2) to validate the correlation between two data.However, results are correlation coefficient, but i want the p-values. so who can help me with this problem, thank you very much!

ChenKang
  • 71
  • 1
  • 5

1 Answers1

2

Since you got two different dataframe to find correlation, it seems that you need corr_result = corr.test(df1, df2, method = ...) from psychpackage. you can get p-value matrix by using corr_result$p

here is the document: https://www.rdocumentation.org/packages/psych/versions/1.8.4/topics/corr.test

Xi wa
  • 154
  • 4