RE: [R] Precision in R

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Wed 21 Jul 2004 - 03:01:13 EST


You can find the info in ?numeric, which says:

Note:

     _R has no single precision data type.  All real numbers are stored
     in double precision format_. ...

I suspect the most likely difference is in the actual algorithms used for the least squares computation. AFAIK SAS uses the sweep operator on the extended cross-product matrix, whereas lm() in R uses QR decomposition on the X matrix.

You can read Prof. Bates' article on least squares computations in R in the most recent issue of the R News, available on www.r-project.org.

HTH,
Andy

> From: adelmaas@musc.edu
>
> Greetings.
>
> I'm trying to recreate in R some regression models I've done in SAS,
> but I'm not getting the same results. My advisor suspects
> this may be
> due to differences in precision between R and SAS. Does anyone know

> where I can find specifications for R's type double? (It
> doesn't seem
> to be in the R Language Definition.) Thanks in advance for any help
> anyone can provide.
>
> Aaron
>
> -------------
> Aaron Solomon (ben Saul Joseph) Adelman
> E-mail: adelmaas@musc.edu
> Web site: http://people.musc.edu/~adelmaas/
> AOL Instant Messenger & Yahoo! Messenger: Hiergargo
> AIM chat-room (preferred): Adelmania
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 21 03:10:16 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:07 EST