Dear Martin Weiss,
Thanks for your fast response, but I think I explain my question badly:
In your solution:
gen newV3=sum(V3)/sum(V3!=.)
Sum (V3) is a sum of all observations, I have a panel data, so, the Id variable
continue with 2,3....3500 and I need the average variable for every
individual in my database. I think I could obtain this with:
by id: gen newV3=sum(V3[_n])
But, I don't know how continue with that, I need to divide this between the
number of the years with valid observation, and I don't know how express this
with STATA.
Thanks,
Sergio
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/