UNIQUE: Stata module to report number of unique values in variable(s)
Tony Brady ()
Statistical Software Components from Boston College Department of Economics
Abstract:
The command unique without a by reports the number of unique values for the varlist. With a by it does the same, but also creates a new variable (_Unique by default but can be named in the gen option). This new variable contains the number of unique values of the varlist for each level of the by variable. The new variable is coded missing except for the first record in each group defined by the levels of the by variable. The command is useful for exploring data where the records refer to more than one level, for example longitudinal data where each record refers to a visit by a subject.
Language: Stata
Requires: Stata version 10.1
Date: 1998-09-04, Revised 2020-06-18
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/u/unique.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/u/unique.sthlp help file (text/plain)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s354201
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().