Page 1 of 1

syntax "group" misbehaviour

Posted: Sun Nov 21, 2010 6:16 am
by nupogodi
I have only one time series in my workbook, the time series is called "myseries".
The following syntax...

group mygroup myseries w*

.. returns an error message ("W is not defined") but it should not, because "myseries" is actually present in the workbook.
In addition, the syntax...

group mygroup w*

...should create an empty group but not to prompt the error message
can you fix this?

Re: syntax "group" misbehaviour

Posted: Mon Nov 22, 2010 10:09 am
by EViews Gareth
This isn't a bug per se, rather it is designed behaviour. The group is supposed to error if no match was found.

Part of this arises from the dual use of the * character as a wildcard and as a multiplication. If you type

Code: Select all

group mygrp x*y
EViews will first check whether there is a series called X and a series called Y, and will then multiply them and put the result in the group. If there is no X and no Y, then it will do a pattern search for any series called X*Y where * is a wildcard.

If both fail, then EViews doesn't know what you were intending to do. Whilst it may be better for the group to return empty if you were really trying to do a pattern match, it is certainly not good for an empty group to be returned if you were trying to do the multiplication.


You can use the @wlookup function do get the behaviour you do want though:

Code: Select all

%temp = @wlookup("w*", "series") group mygroup myseries {%temp}