[R] Precision in R
Liaw, Andy
andy_liaw at merck.com
Tue Jul 20 19:01:13 CEST 2004
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 at 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 at musc.edu
> Web site: http://people.musc.edu/~adelmaas/
> AOL Instant Messenger & Yahoo! Messenger: Hiergargo
> AIM chat-room (preferred): Adelmania
>
> ______________________________________________
> R-help at 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
>
>
More information about the R-help
mailing list