[Gretl-users] Creating a series
bulente at gmail.com
Wed Mar 28 18:52:47 EDT 2012
I'd like to create a series of which an observation will refer to (or will
be calculated using) the previous observation of the same series.
For example, I want to end up with a series like below:
Is it possible to create this series with a command similar to:
series s = s(-1) + 5
(Of course, this series can be generated by a formula like obs * 5 but this
is not what I meant.)
In such a command, one observation will be calculated by a function which
receives the previous observation.
The command above wouldn't compile with error "The symbol 's' is undefined"
because at the time of the declaration there's no variable as s.
Could you recommend a solution ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gretl-users