Dear Gretl Users!
I've 30 variables and want to generate vector (n) with number of valid
observations for each variable. I'm using 'ok' function but something is
wrong (see script below). Probably '$i' is not taken as an i-th variable
but as a series containg only "i". What do you think about it? How to be
sure that '$i' is taken as an i-th variable?
<hansl>
n=zeros(30,1)
loop i=1..30
a=sum(ok($i))
n[i,1]=a
endloop
print n
Regards,
Mariusz
Show replies by thread