Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: AW: Create a flag variable for 10 most frequent values


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: AW: Create a flag variable for 10 most frequent values
Date   Tue, 17 Nov 2009 13:30:34 +0100

<> 

" Another bottom line is that nobody seems to be looking around to see
whether the problem has been solved already, at least in part."



How do you know nobody tried to -findit-? In other words: Which terms would
I have to distill from Elan`s initial request and use with -findit- to
notice that -modes- solves this problem?


HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nick Cox
Gesendet: Dienstag, 17. November 2009 12:36
An: [email protected]
Betreff: RE: st: AW: Create a flag variable for 10 most frequent values

Another bottom line is that nobody seems to be looking around to see whether
the problem has been solved already, at least in part. 

-modes- from SJ was updated in 2003: 

SJ-3-2  sg113_1 . . . . . . . . . . . . . . . . . .  Software update for
modes
        (help modes if installed) . . . . . . . . . . . . . . . . .  N. J.
Cox
        Q2/03   SJ 3(2):211
        provides new option for specifying the number of modes to
        be shown

That doesn't create a flag variable, but it seems a reasonable extra option,
so I will add that task to my to-do list. 

Nick 
[email protected] 

Martin Weiss

Bottom line so far: It takes a bit of ingenuity to do what Elan initially
requested, unless somebody comes along with a neat solution...

Cohen, Elan

>>>> I have a string variable dx that represents a patient's diagnosis
(about
>>>> 5,000 unique values).  I'd like to create a "top 10 flag" that equals 1
>>
>> if
>>>>
>>>> dx is one of the top 10 most frequent diagnoses and 0 otherwise.
>>>>
>>>> I'm not even sure where to begin.  If someone could point me in the
>>>> right
>>>> direction, I'd be grateful.  Stata 10, Windows XP

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


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