Michael Carney
>
> I think I would likely consider it a formula: i'd like to
> generate a new
> variable in which each observation of the variable price,
> for example, is
> subrtacted from its previous observation. E.g., if obs1 in
> "price" is 100 and
> obs2 is 75 i would like the first observation in "change in
> price" to be -25,
> and so forth.
>
I don't understand how this relates to the previous
formulation, but this sounds like, given variables
-time- and -price-,
tsset time
gen chprice = D.price
gen pcchprice = 100 * D.price / L.price
See help on -tsset- and -varlist-.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/