Speaking Stata: Distinct observations

Distinct observations are those different with respect to one or more variables, considered either individually or jointly. Distinctness is thus a key aspect of the similarity or difference of observations. It is sometimes confounded with uniqueness. Counting the number of distinct observations may be required at any point from initial data cleaning or checking to subsequent statistical analysis. We review how far existing commands in official Stata offer solutions to this issue, and we show how to answer questions about distinct observations from first principles by using the by prefix and the egen command. The new distinct command is offered as a convenience tool.


Issue Date:
2008
Publication Type:
Journal Article
DOI and Other Identifiers:
dm0042 (Other)
PURL Identifier:
http://purl.umn.edu/122622
Published in:
Stata Journal, Volume 08, Number 4
Page range:
557-568
Total Pages:
12

Record appears in:



 Record created 2017-04-01, last modified 2017-08-26

Fulltext:
Download fulltext
PDF

Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)