When using duplicates drop, Stata will keep the first occurrence and
drop any subsequent ones. If you want to selectively drop specific
duplicates, then I suggest you do it manually, for example:
bysort id: gen dup=_n
gen dup2="YES" if dup>1
replace dup2="NO" if dup==1
then, you can selectively drop the observations you want according to
the value of some other variable, for example:
drop if dup2=="YES" & some_variable=="something_value"
Hope this helps,
Thomas
Thomas Speidel
Statistical Associate
Department of Oncology
Tom Baker Cancer Centre
1331 - 29th Street N.W.
Calgary, AB, T2N 4N4
Tel. (403) 521-3370
Email: [email protected]
This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/