On Wed, 10 Mar 2010, Franck Nadaud wrote:
I am currently preparing data for a cross-section demand system
estimation (AIDS or QAIDS stuff) on a large survey file (~10.000
observations). To avoid clumsy and repetitive (and error prone)
action, I decided to use the gretl variable list concept.
However, one I haved defined my list and I want to do
computations, gretl manifested the following minor problem:
When I use the following script:
list ALL = dataset
list NON_DEP = 1 2 237 238 239 240 241 242 243
list DEP = ALL - NON_DEP
nel = nelem(DEP)
series DEPTOT = sum(DEP)
gretl says: argument should be series, is list, but it seems ok
on the manual, chapter 11 on lists and computations...
Hi Franck,
You're right. The User's Guide says that the functions max, min,
mean, sd, sum and var all accept a list argument, in which case
they work "horizontally", returning a series each of whose
elements is the appropriate function of the members of the list at
the given observation.
However, "sum" seems to have got into an inconsistent state: the
Function Reference contradicts the User's Guide, stating that this
function only accepts a series argument and always returns a
scalar -- and up till now that has in fact been the case.
This is now fixed in CVS: I've "upgraded" sum() so that it will do
what the User's Guide says it can do.
Allin