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

From |
Kit Baum <baum@bc.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Re: saving memory local vs usual variable |

Date |
Wed, 8 Oct 2008 08:22:46 -0400 |

< >

Kit Baum, Boston College Economics and DIW Berlin http://ideas.repec.org/e/pba1.html An Introduction to Modern Econometrics Using Stata: http://www.stata-press.com/books/imeus.html On Oct 8, 2008, at 02:33 , Eva wrote:

thank you for your reply. I have in front of me my old NetCourse 152 (Stata 8!) which says: "Scalars give us a way of obtaining a perfect binary copy of the binary number in ...". Later on, it says: "In short, you must use scalars if you plan to obtain a value from the data and then, later, test the data for exact equality with that value. In all other cases, use scalars when you need greater accuracy." And here is an example showing that the local macro is not the same as the scalar. Am I misunderstanding something completely? Thanks, Eva . sysuse auto, clear (1978 Automobile Data) . replace foreign = 1.10101 if foreign==0 foreign was byte now float (52 real changes made) . replace foreign = 1.20101 if foreign==1 (22 real changes made) . sum foreign Variable | Obs Mean Std. Dev. Min Max- -------------+--------------------------------------------------------foreign | 74 1.13074 .0460189 1.10101 1.20101 . local min = r(min) . scalar Min = r(min) . count if foreign==`min' 0 . count if foreign==Min 52 . di `min' - Min - -2.220e-16

* * 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/

**Follow-Ups**:**st: sequential model***From:*funke alaba <funkeal@yahoo.com>

- Prev by Date:
**st: Iv with mprobit/mlogit** - Next by Date:
**Re: st: How to label the value 999999999999** - Previous by thread:
**Re: st: Re: saving memory local vs usual variable** - Next by thread:
**st: sequential model** - Index(es):

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