Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: confirm a variable is an identifiant


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: confirm a variable is an identifiant
Date   Wed, 24 Jun 2009 12:19:55 -0500

bysort ID : assert _N == 1

I am sure this has been covered in Stata Journal Nick Cox' "Speaking
Stata" columns and tips.

On Wed, Jun 24, 2009 at 11:50 AM, Jean-Benoit
Hardouin<[email protected]> wrote:
> Dear all,
> I search to verify if a variable is an identifiant that is to say that each
> row of a file have a different value on this variable than all the others
> rows.
> I want to use the -inspect- to compare the number of "unique value" (if the
> number of unique value is equal to the number of individual then the
> variable is an identifiant) but -inspect- don't count the number of
> different values if this number is superior to 100.
> Have someone an idea ?
> Best regards,
> Jean-Benoit
>
> --
>
> Jean-Benoit Hardouin, PhD
> Maitre de Conférences - Assistant Professor
> EA 4572 "Biostatistics, Clinical Research and Subjective Measures in Health
> Sciences"
> http://www.sante.univ-nantes.fr/biostat/
>
> Departement of Biomathematics and Biostatistics
> Faculty of Pharmaceutical Sciences
> University of Nantes
> 1, rue Gaston Veil - BP 53508 44035 Nantes Cedex 1 - FRANCE Email :
> [email protected]
> Personal website : http://www.anaqol.org
> *
> *   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/
>



-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index