Re: [R] Loss of numerical precision from conversion to list ?

From: Fabian Scheipl <f.abian_at_gmx.net>
Date: Fri 21 Jul 2006 - 19:51:07 EST

Thank you both very much for your help.

Peter Dalgaard is right- i didn't consider the fact that elementwise multiplication is column-wise rather than row-wise. Sorry for taking up time&space with such a trivial mistake.

> Duncan Murdoch <murdoch@stats.uwo.ca> writes:
>
> > R tries to use the maximum precision (64 bit mantissa) in the floating
> ...
> > Or perhaps your problem has nothing to do with this; I didn't really
> > look at it in detail.
>
> It hasn't. I was off speculating about sum vs rowSums too, but:
>
> > > num.v<- rowSums(((lambda-lambda0)*mu*w.k.sq[,-(K+1)])/(1+lambda*mu))
>
> Inside this, we have mu*w.k.sq[,-(K+1)] . mu is a vector of length 27,
> and w.k.sq has 10 rows and 28 *columns*. Column-major storage and
> vector recycling kicks in... If mu has identical elements (never mind
> the magnitude), of course, the recycling doesn't matter.
>
> --
> O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45)
> 35327918
> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45)
> 35327907

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Jul 21 19:55:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 21 Jul 2006 - 22:16:22 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.