Ignazio,
This is error message is possibly because you have an unbalanced dataset,
but I do not think so... Anyway, try to use an appropriate panel variance
structure for unbalanced panels together with the 'force' option, that is,
do not use 'panel(corr)' as in the provided example, see:
http://www.stata.com/support/faqs/stat/xtgls.html
A more likely solution is to try to check for duplicates to see what went
wrong:
http://www.stata.com/support/faqs/data/repeatedtime.html
Hope that helps.
Best,
Johan Hellstrom
*
* 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/