Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: testing -duplicates tag-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: testing -duplicates tag-
Date   Wed, 3 Sep 2008 17:39:38 +0100

As I understand it, the only thing the -tag- subcommand is designed to
do is -generate- a new variable with specific properties. 

It doesn't -list- or otherwise display what it produces. 

Think of what -generate- does. You ask for a new variable. If the syntax
is correct, 
you will get one. If you want to look at it, you need to follow up with
some other command. 

In your example, following with 

. l headroom trunk  dup_admission_id if trunk == 8

     +-----------------------------+
     | headroom   trunk   dup_ad~d |
     |-----------------------------|
 20. |      2.0       8          1 |
 45. |      1.5       8          0 |
 57. |      2.0       8          1 |
 58. |      2.5       8          1 |
 59. |      2.5       8          1 |
     +-----------------------------+

will show what -duplicates tag- did for you. 

Nick 
[email protected] 

Michael McCulloch

I'm testing -duplicates tag-, and puzzled as to why it won't show the 
two observations where headroom==2.0 and trunk==8.

clear
sysuse auto
list foreign headroom trunk if trunk==8
duplicates tag headroom trunk, generate(dup_admission_id)


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