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" <[email protected]>
To   <[email protected]>
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 
[email protected] 

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