--- William Bishop <[email protected]> wrote:
> I have data that get updated and need to make calculations based on
> the state of knowledge on certain dates.
>
> For examples, say I am doing a moving average based on stock closing
> prices. If my state of knowledge on Wednesday is that Tuesday's
> closing price was $10 - but then on Friday I learn (new information)
> that Tuesday's closing price was actually $12. For calculations on
> Wednesday and Thursday I want to use $10 as Tuesday's closing price,
> Friday and all following days I want to use the corrected price of
> $12.
>
> What is the best way to arrange the data in Stata to accomplish this?
It appears to me that a basic representation of that problem can be
handled using -rolling-, so in that case you'd have time points as
observations (rows) and price as a variable (column).
-- Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/