Statalist


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

RE: st: AW: Creating a variable taking the value of elasticity


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: AW: Creating a variable taking the value of elasticity
Date   Tue, 8 Sep 2009 15:14:32 +0100

In general, it's a bad idea on two grounds:

1. Efficiency. Holding the same number again and again in every
observation of a variable (that's how it works) impacts storage.
Sometimes that can be limiting. 

2. Style. Single numbers can be held in macros or scalars, which is
better style. 

For your application, which Martin didn't know about when he made his
otherwise very sensible comment, it is a good idea, but you should
almost certainly be letting -statsby- do the work for you. 

Nick 
n.j.cox@durham.ac.uk 

Dorothy Bridges

 Why is storage in a variable not
recommended?  I am doing this so that I can make a histogram comparing
the elasticities (coefficients) from a dozen different regressions.


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index