Speaking Stata: Distinct observations
Distinct observations are those diﬀerent with respect to one or more variables, considered either individually or jointly. Distinctness is thus a key aspect of the similarity or diﬀerence 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 oﬃcial Stata oﬀer solutions to this issue, and we show how to answer questions about distinct observations from ﬁrst principles by using the by preﬁx and the egen command. The new distinct command is oﬀered as a convenience tool.
Volume (Year): 8 (2008)
Issue (Month): 4 (December)
|Contact details of provider:|| Web page: http://www.stata-journal.com/|
|Order Information:||Web: http://www.stata-journal.com/subscription.html|
Please report citation or reference errors to , or , if you are the registered author of the cited work, log in to your RePEc Author Service profile, click on "citations" and make appropriate adjustments.:
- Nicholas J. Cox, 2002. "Speaking Stata: How to move step by: step," Stata Journal, StataCorp LP, vol. 2(1), pages 86-102, February.