Statalist


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

RE: st: : RE: list command


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: : RE: list command
Date   Mon, 4 Aug 2008 16:59:35 +0100

This to me is not much clearer than it was before. 

It may be that you want to -list- -ndc- for which there are two or more
distinct -gpi-. 

If that is so, -findit distinct-, or 

bysort ndc (gpi) : list if gpi[1] != gpi[_N] 

Nick
n.j.cox@durham.ac.uk 

Daniel Sepulveda-Adams

OK here is an example of what happened in the dataset, this dataset is a
drugs description, therefore codes are associated to names and strength
the
drug and packages size, etc.

Ex:
1) ndc (National Drug Code) assigned one gpi (Generic Product
Identifier)

ndc: 49502007412   gpi: 44100010102005

2) ndc that has more than one gpi (9 in this specific case, why because
each
gpi represent a different packages size)

Ndc: 00904161260  gpi: 44300040007440

Steven Samuels

Daniel, Show us simple examples of data where an observation on  'ndc'
1) does
2) does not

"have two or more gpi".

It seems that by the phrase "two or more gpi" you do NOT mean "gpi = 2"

On Aug 4, 2008, at 11:22 AM, Daniel Sepulveda-Adams wrote:

> I have a question about list command; this is what I'm doing:
>
> list ndc old_ndc e49_ gpi g64_ if gpi>"2"
>
> gpi is a str variable (it is a 14 digit code) & I know is wrong but  
> I can
> not figure it out how I can ask the program give me all ndc that  
> has 2 or
> more gpi.Thanks

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index