Thanks a lot - solved the issue!
BW
Troels
-Oprindelig meddelelse-
Fra: Rui Barradas
Sendt: 12. juli 2020 12:59
Til: tr...@gvdnet.dk; r-help mailing list
Emne: Re: [R] Rmpfr correlation
Hello,
Why not write a function COR? Not one as general purpose as stats::cor but a
simple one
Hello,
Why not write a function COR? Not one as general purpose as stats::cor
but a simple one, to compute the sample Pearson correlation only.
library(Rmpfr)
COR <- function(x, y){
precBits <- getPrec(x)[1]
n <- mpfr(length(x), precBits = precBits)
x.bar <- mean(x)
y.bar <- mean(y)
Dear friends - I'm calculating buffer capacities by different methods and
need very high precision and package Rmpfr is working beautifully. However,
I have not been able to find out how to keep precision when finding
correlations.
library(Rmpfr)
KA <- mpfr(10^-4.6, 128)
x <- rnorm(100)*KA
y <-
3 matches
Mail list logo