similar to: Rounding problem R vs Excel

Displaying 20 results from an estimated 300 matches similar to: "Rounding problem R vs Excel"

2003 Jun 04
2
Rounding problem R vs Excel.
David A. Paul wrote: > I don't have the reference, but a biologist friend of mine once > showed me a refereed journal article that purported to demonstrate > numerical errors made by MSExcel. This would have been Excel97 or > Excel2000... In any case, the journal's scope was biological in > nature and the article was of interest since Excel is heavily used in > that
2009 Apr 22
2
integrate lgamma from 0 to Inf
Dear R users, i try to integrate lgamma from 0 to Inf. But here i get the message "roundoff error is detected in the extrapolation table", if i use 1.0e120 instead of Inf the computation works, but this is against the suggestion of integrates help information to use Inf explicitly. Using stirlings approximation doesnt bring the solution too. ## Stirlings approximation lgammaApprox
2004 Aug 06
1
project 'Sphinx' kicked off
Mark Borgerding wrote: > Each math operation introduces some error. So the fewer operations > required, the fewer roundoff errors occur. This leads to a happy > correlation between efficiency and accuracy. The more important problem is addition of numbers that differ in magnitude. Roundoff error is soooo small compared to that ;) <p>Segher --- >8 ---- List archives:
2013 Jul 16
2
Problem following an R bug fix to integrate()
I have been told by the CRAN administrators that the following code generated an error on 64-bit Fedora Linux (gcc, clang) and on Solaris machines (sparc, x86), but runs well on all other systems): > fn <- function(x, y) ifelse(x^2 + y^2 <= 1, 1 - x^2 - y^2, 0) > tol <- 1.5e-8 > fy <- function(x) integrate(function(y) fn(x, y), 0, 1,
2012 Sep 25
1
how to pass a function to a function inside a function
Hi, I'm trying to compile two functions into one function. the first funtion is called 'fs' which is self-made function, another function is from the built-in 'integration' function that is copy-paste-edited. If built separatey, these functions work well. However that is not the case if combines together, where certainly I made mistake somewhere when constructing the code.
2011 Apr 24
2
random roundoff?
On my CentOS 5 box, in a C++ program that does much arithmetic, including numerous matrix multiplications, I have a situation in in which the result depends on the nature of nearby I/O. Thus, with all arithmetic done with type double, and where values are mostly in the range [-1.0e0,+1.0e0] or nearby, I do: cerr << "some stuff" << endl; mat3 = matmult(mat1,mat2); I
2020 Mar 02
0
dput()
>>>>> robin hankin >>>>> on Sun, 1 Mar 2020 09:26:24 +1300 writes: > Thanks guys, I guess I should have referred to FAQ 7.31 > (which I am indeed very familiar with) to avoid > misunderstanding. I have always used dput() to clarify > 7.31-type issues. > The description in ?dput implies [to me at any rate] that > there
2020 Mar 02
0
dput()
>>>>> Duncan Murdoch >>>>> on Mon, 2 Mar 2020 04:43:53 -0500 writes: > On 02/03/2020 3:24 a.m., Martin Maechler wrote: >>>>>>> robin hankin >>>>>>> on Sun, 1 Mar 2020 09:26:24 +1300 writes: >> >> > Thanks guys, I guess I should have referred to FAQ 7.31 >> > (which I
2005 Jul 28
1
conversion from SAS
Hi, I wonder if anybody could help me in converting this easy SAS program into R. (I'm still trying to do that!) PROC IMPORT OUT= WORK.CHLA_italian DATAFILE= "C:\Documents and Settings\carleal\My Documents\REBECCA\stat\sas\All&nutrients.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; data chla_italian; set chla_italian;
2020 Feb 29
2
dput()
Thanks guys, I guess I should have referred to FAQ 7.31 (which I am indeed very familiar with) to avoid misunderstanding. I have always used dput() to clarify 7.31-type issues. The description in ?dput implies [to me at any rate] that there will be no floating-point roundoff in its output. I hadn't realised that 'deparsing' as discussed in dput.Rd includes precision roundoff issues.
2011 Jan 12
1
Integrate and subdivisions limit
Dear all, I have some issues with integrate in R thus I would like to request your help. I am trying to calculate the integral of f(x)*g(x). The f(x) is a step function while g(x) is a polynomial. If f(x) (step function) changes its value only few times (5 or 6 'steps') everything is calulated ok(verified results in scrap paper) but if f(x) takes like 800 different values I receive the
2020 Mar 02
2
dput()
On 02/03/2020 3:24 a.m., Martin Maechler wrote: >>>>>> robin hankin >>>>>> on Sun, 1 Mar 2020 09:26:24 +1300 writes: > > > Thanks guys, I guess I should have referred to FAQ 7.31 > > (which I am indeed very familiar with) to avoid > > misunderstanding. I have always used dput() to clarify > > 7.31-type
2007 Nov 23
1
complex conjugates roots from polyroot?
Hi, All: Is there a simple way to detect complex conjugates in the roots returned by 'polyroot'? The obvious comparison of each root with the complex conjugate of the next sometimes produces roundoff error, and I don't know how to bound its magnitude: (tst <- polyroot(c(1, -.6, .4))) tst[-1]-Conj(tst[-2]) [1] 3.108624e-15+2.22045e-16i
2005 Oct 11
2
Logistic Regression using glm
Hello everyone, I am currently teaching an intermediate stats. course at UCSD Extension using R. We are using Venables and Ripley as the primary text for the course, with Freund & Wilson's Statistical Methods as a secondary reference. I recently gave a homework assignment on logistic regression, and I had a question about glm. Let n be the number of trials, p be the estimated
2006 Nov 21
1
Maybe not a stable if statement
I have the structure, fxdata, below and I want to only keep data points of it in which the "bid" and the "ask" column names are both greater than zero. It's very hard to reproduce my problem because it seems like the behavior ( whether it gets rid of all the the zeros or not ) depends on the size of fxdata ? I had the following line for doing the above :
2002 Jan 07
0
New package: colSums
I've uploaded a package colSums_1.0.tar.gz to CRAN /src/contrib/Devel. It contains functions colSums, colMeans, colVars, colStdevs, rowSums, rowMeans, rowVars, and rowStdevs. These do simple, fast arithmetic on columns/rows of a matrix, or more generally across dimensions of an array, e.g. colSums(m) = apply(m, 2, sum) but faster. They should be compatible with the corresponding S-Plus
2004 Jun 01
0
qhull in R?
Hi, does anyone know if there is an implementation of qhull (http://www.qhull.org/) in R? anyone is planning on it? "Qhull computes convex hulls, Delaunay triangulations, halfspace intersections about a point, Voronoi diagrams, furthest-site Delaunay triangulations, and furthest-site Voronoi diagrams. It runs in 2-d, 3-d, 4-d, and higher dimensions. It implements the Quickhull algorithm
2004 Aug 06
0
project 'Sphinx' kicked off
>> I had the idea of implementing a lot of the operations in FFTs. ( for >> example, it is possible to do auto-correlation and FIR filtering using >> FFTs.) There are two advantages to this. >> 1. It's almost always faster >> 2. By swapping fft implementations, it could be easy to recompile for >> fixed or floating point versions. > > No. FFT's
2002 Jan 16
0
round() doesn't (PR#1139)
Hi, all, In PR#1138 and PR#1139, I pointed out that round() with digits<0 would not actually round to an integer. Brian D. Ripley (hereafter BDR) fixed it in R-1.4.0, but the fix introduced a new error, PR#1254 (caught by Ole Christensen). BDR (I'm guessing) fixed the fix; here's the relevant line from fround.c: if(dig <= 0 && fabs(res) < 1e9) res = (int)floor(res +
2012 May 03
0
Modified Cholesky decomposition for sparse matrices
I am trying to estimate a covariance matrix from the Hessian of a posterior mode. However, this Hessian is indefinite (possibly because of numerical/roundoff issues), and thus, the Cholesky decomposition does not exist. So, I want to use a modified Cholesky algorithm to estimate a Cholesky of a pseudovariance that is reasonably close to the original matrix. I know that there are R packages that