It's certainly good technique.
. isid date
is another way to do it.
. tsset date
would also test uniqueness (literally!) of dates.
Nick
On Wed, Jan 16, 2013 at 12:35 PM, annoporci <annoporci@gmail.com> wrote:
>> Or, he can check if each date occurs at most once,
>> and simplify his code.
>> bys date : assert _n == 1
>> summ open if date == mdy(1,2,2001), meanonly
>> scalar newscalar = r(mean)
>
>
> In the present case, date is a unique identifier, but this is a great
> addition to my toolkit:
>
>
> bys date : assert _n == 1
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/