Dear Allin and Artur,

thanks for your kind suggestions. Now everything is much more simple!

Regards
Leandro

2011/3/9 Allin Cottrell <cottrell@wfu.edu>
On Tue, 8 Mar 2011, Leandro Zipitria wrote:

> I am working with a panel and I want to get the mean for each
> unit, but just once. If I use the pmean(x) I get the mean of
> each unit repeated for each observation in that unit.

The quick method:

matrix pmx = values(pmean(x))

But if two or more panel groups have the same mean for x this will
drop the duplicates, which is probably not what you want. In that
case you can ensure you get the full vector of means via

genr time
series tmp = pmean(x)
smpl time == 1 --restrict
matrix pmx = tmp
smpl --full

Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users