Dear Nick,
Thank you for your further comment.
> -tsset- should work fine with panel
> data. Looking again at the example
> data you showed previously, I see
> that you do not have data for each
> year. However, the error message
> below arises for a different reason.
>
> Try
>
> . duplicates list code year
You are right.
-duplicates- detected not a few duplicated observations.
When I retried after deleting those observations, thing went well.
Though I'm not still sure how to utilize -tsspell- to create a variable
that records the number of distinct values in -dept- for each sample,
I give it time and keep trying.
K.I.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/