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

Re: st: dealing with states of knowledge

From   Maarten buis <>
Subject   Re: st: dealing with states of knowledge
Date   Wed, 26 Nov 2008 07:15:27 +0000 (GMT)

--- William Bishop <> 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

*   For searches and help try:

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