Re: [R] identical values not so identical? newbie help please!

From: Nordlund, Dan (DSHS/RDA) <NordlDJ_at_dshs.wa.gov>
Date: Thu, 10 Mar 2011 10:02:27 -0800

> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-
> project.org] On Behalf Of maiya
> Sent: Thursday, March 10, 2011 7:19 AM
> To: r-help_at_r-project.org
> Subject: [R] identical values not so identical? newbie help please!
>
> Hi there!
> I'm not sure I can create a minimal example of my problem, so I'm
> linking to
> a minimal .RData file that has only two objects: obs and exp, each is a
> 6x9
> matrix. http://dl.dropbox.com/u/10364753/test.RData link to dropbox
> file
> (I hope this is acceptable mailing list etiquette!)
>
> Here's what happens:
> > obs[1, 1]
> [1] 118
> > exp[1, 1]
> [1] 118
> > obs[1, 1]-exp[1, 1]
> [1] 2.842171e-14
>
> Problem is, both obs and exp should be identical. They are the result
> of a
> saturated loglinear model, and I've run the same code across about 400
> tables, all of which result in sum(obs-exp)=0, except for this one. I
> can't
> figure it out?
>
> Anyway, I need help understanding why 118 and 118 are not really the
> same. I
> appreciate some may be wary of downloading my .Rdata file (I'm on
> ubuntu if
> that's any consolation), but I don't know how else to ask this
> quesiton!
>
> Thanks!
>
> Maja Z.
>

See the R FAQ 7.31

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division
Olympia, WA 98504-5204



R-help_at_r-project.org 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 Thu 10 Mar 2011 - 18:06:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Mar 2011 - 18:10:21 GMT.

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

list of date sections of archive