0

I got the warning message, In sqrt(1 - h * h) : NaNs produced, when I run Hmisc::rcorr() for a dataset of 36 rows and 16 columns (all numeric). How can I correct this?

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Does it work with `cor`? – csgroen Jun 26 '20 at 15:25
  • 1
    To be able to answer this, you'll probably need to provide a minimum reproducible example - that's a short code including your data that demonstrates the problem. `dput()` is often the best way to get your data into a form that can be posted here. – Miff Jun 26 '20 at 15:27
  • 2
    Seems like you are taking the square root of negative numbers. Check your `r -h*h`vector. – slava-kohut Jun 26 '20 at 15:27
  • rcorr.adjust(x, type="pearson", use="pairwise.complete.obs") #tried this. Error was... could not find function "rcorr.adjust" – Anandachary Ponaganti Jun 26 '20 at 15:45
  • The `rcorr.adjust()` function is in package `RcmdrMisc`. Have you installed the package with `install.packages("RcmdrMisc")` and loaded it with `library(RcmdrMisc)`? – dcarlson Jun 26 '20 at 19:14

0 Answers0