> set.seed(1)
> m <- matrix(rnorm(500),ncol=2)
> cor(m)
# [,1] [,2]
# [1,] 1.00000000 0.04060113
# [2,] 0.04060113 1.00000000
> options(digits=12)
> cor(m)
# [,1] [,2]
# [1,] 1.0000000000000 0.0406011304584
# [2,] 0.0406011304584 1.0000000000000
HTH,
Eric
On Tue, Nov 5, 2019 at 7:02 PM Ana Marija <sokovic.anamarija at gmail.com>
wrote:
> Hi,
>
> I am running this function:
>
> library(psych)
> corr.test.col.1to3 <- corr.test(allF[1:3], method =
"spearman", use > "complete.obs")
> names(corr.test.col.1to3)
> corr.test.col.1to3$p
>
> and my result looks like this:
>
> > corr.test.col.1to3$p
> B_NoD B_DwoC B_DwC
> B_NoD 0.0000000 0.0000000 1
> B_DwoC 0.0000000 0.0000000 1
> B_DwC 0.6501836 0.6501836 0
>
> Does anyone know how to get higher precision for those p values
> instead of 0.0000000?
>
> I tried:
> corr.test.col.1to3 <- corr.test(allF[1:3], method =
"spearman", use > "complete.obs",minlength=20)
>
> but it didn't change anything
>
> if I do:
> > str(corr.test.col.1to3)
> List of 11
> $ r : num [1:3, 1:3] 1 1 0.0139 1 1 ...
> ..- attr(*, "dimnames")=List of 2
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> $ n : num 1068
> $ t : num [1:3, 1:3] Inf Inf 0.454 Inf Inf ...
> ..- attr(*, "dimnames")=List of 2
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> $ p : num [1:3, 1:3] 0 0 0.65 0 0 ...
> ..- attr(*, "dimnames")=List of 2
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> $ se : num [1:3, 1:3] 0 0 0.0306 0 0 ...
> ..- attr(*, "dimnames")=List of 2
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> .. ..$ : chr [1:3] "B_NoD" "B_DwoC" "B_DwC"
> $ sef : num 0.0306
> $ adjust: chr "holm"
> $ sym : logi TRUE
> $ ci :'data.frame': 3 obs. of 4 variables:
> ..$ lower: num [1:3] NaN -0.0461 -0.0461
> ..$ r : num [1:3] 1 0.0139 0.0139
> ..$ upper: num [1:3] NaN 0.0738 0.0738
> ..$ p : num [1:3] 0 0.65 0.65
> $ ci.adj:'data.frame': 3 obs. of 2 variables:
> ..$ lower.adj: num [1:3] NaN -0.0461 -0.0547
> ..$ upper.adj: num [1:3] NaN 0.0738 0.0824
> $ Call : language corr.test(x = allF[1:3], use =
"complete.obs",
> method = "spearman")
> - attr(*, "class")= chr [1:2] "psych"
"corr.test"
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]