mary
2013-Feb-05 23:40 UTC
[R] How to menage decimals in order to obtain accurate estimates
Hi, I'm trying to calculate some functions loop, unfortunately my data are decimal numbers that not allow me to get an accurate estimate. I do not want to use neither "round "nor "signif" but I would prefer to have all the information available, (the function loop is generic so you should adapt to all data, not just those in particular). The approximation error is multiplied in subsequent operations (I calculate the median and then the mad and so on...) and so eg. instead of getting 1.000 I get 1.0003. I saw that there is a package Rmpfr but I have problems loading the package gmp also I do not know how to use it. thanks -- View this message in context: http://r.789695.n4.nabble.com/How-to-menage-decimals-in-order-to-obtain-accurate-estimates-tp4657659.html Sent from the R help mailing list archive at Nabble.com.
Jim Lemon
2013-Feb-06 02:34 UTC
[R] How to menage decimals in order to obtain accurate estimates
On 02/06/2013 10:40 AM, mary wrote:> Hi, > > I'm trying to calculate some functions loop, unfortunately my data are > decimal numbers that not allow me to get an accurate estimate. I do not want > to use neither "round "nor "signif" but I would prefer to have all the > information available, (the function loop is generic so you should adapt to > all data, not just those in particular). The approximation error is > multiplied in subsequent operations (I calculate the median and then the mad > and so on...) and so eg. instead of getting 1.000 I get 1.0003. > > I saw that there is a package Rmpfr but I have problems loading the package > gmp also I do not know how to use it. >Hi mary, It's a bit difficult to understand what you are trying to do. It looks like the "machine precision" problem (FAQ 7.31), especially since you have mentioned the gmp package. Installing the gmp package requires that you have a compiler, is this the problem? Jim