[R] qustion with lars (lasso) package

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 28 17:30:01 CEST 2004

On Thu, 28 Oct 2004, Guan Xing wrote:

> I am using lars package written by Dr. Trevor Hastie, the version is
> lars_0.9-5 downloaded from cran. When I ran the diabetes example data
> attached in package, I found that the beta outputs from different
> machines are different. The difference is only about 10^-11 to 10^-12,
> some friends suggested that it possibly is a machine precision problem.
> But I check the machine numerical characteristics with command "
> str(.Machine)", all four machines I am using give me same information. I
> am wondering whether someone has noticed this problem before. Could I
> make some restriction and get the same results on all machines

Yes. Run exactly the same version of R (that is, the exact same files) on 
all the machines, if they have exactly the same OS and similar chips.

Otherwise you and your friends need to take a course in numerical methods.
Even different versions of the same compiler will produce different code 
ordering operations differently and some give different results.  For 
example, R built with --enable-R-shlib gives different answers to that 
built without, and R using different BLAS libraries can give quite 
different answers.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list