Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: How to deal with the accruacy of storage type?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: How to deal with the accruacy of storage type?
Date   Mon, 28 Sep 2009 20:23:40 +0200

<>

Also note http://www.stata.com/support/faqs/data/float.html and
http://www.stata.com/support/faqs/data/prec.html



HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Montag, 28. September 2009 20:09
To: statalist
Subject: st: How to deal with the accruacy of storage type?

I encountered a problem on the accuracy of storage type. 

For example, I typed the following in the stata,


clear
input       x y
    .46520616   .4652062
    .02347426   .0234743
    .01774185   .0177418
    .04014428   .0401443
    .24818808   .2481881
    .41385191   .4138519
    .27035237   .2703524
    .03764375   .0376438
    .22899382   .2289938
    .08620364   .0862036
end
l
count if x==y


The result of "count if x==y" is 0. However, in my actual matter, this
situation should be treated as equal between x and y if  the # digits (such
as four or five) after decimal are the same. 

What is the right command to express the above meaning?

Thank you a lot for any help.


Best regards,

Rose.

 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index