Thanks for the suggestion. A couple of things.
First, your proposed syntax is interesting. One issue is that one could conceivably want the alternate definition of your @elem in which we return the cross-section value for the given year, as in
PX/@elem(PX,"UK")
That's all fine, but now the issue comes as to how to disambiguate the two approaches. One idea is to use @elem in the fashion that you suggested, and to add an @elemc or some other such function which returns the others. We'll give this some more thought.
One of the reasons we haven't added the particular function is that most things that we can think of can be done with little effort using current EViews tools. Note that you can (relatively) easily generate your indices in EViews. Expanding on Gareth's suggestion, first, you need to generate a series which has the 1996 values for each cross-section matched to each observation in a cross section. Once you have that, you can compute your index in the natural way:
Code: Select all
series pxscale = @maxsby(PX, @crossid, "1996 1996")
series PX1 = PX / pxscale
You can combine this into a single statement if you'd like
Code: Select all
series PX1 = PX / @maxsby(PX, @crossid, "1996 1996")
You can wrap this in a subroutine if you wish, and even design an add-in to handle the front end input so that all you'd have to enter is the series name and the year/date.
Hope this helps. Thanks again for the suggestion.