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

From |
"Steichen, Thomas" <STEICHT@RJRT.com> |

To |
"StataList" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: -egen eqany()- numlist |

Date |
Thu, 12 Sep 2002 15:32:51 -0400 |

Daniel Grochulski writes > numlist in v(numlist) expands using same convention that the -numlist- > command uses: list element like 17/22 expands to 17 18 19 20 > 21 22, but > whenever you use : (colon) it means Stata looks for list > element like n1 n2 > to n3 and expands 8 17:22 to just 8 17 (because 17 + 9 = 26 and 26 is > greater than 22). Use of numlists is particularly tricky in > egen function > fill(numlist)... Thanks Dan... I see had not read the applicable online help for -numlist- carefully enough: 1 2 to 4 four numbers, 1, 2, 3, 4 4 3 to 1 four numbers, 4, 3, 2, 1 10 15 to 30 five numbers 10, 15, 20, 25, 30 1 2:4 same as 1 2 to 4 4 3:1 same as 4 3 to 1 10 15:30 same as 10 15 to 30 I looked at the first two examples, saw the pattern therein that I needed, and assumed I understood it. I read the first as 1 and the numbers 2 to 4 (i.e, 2, 3, 4). Likewise, the second as 4 and the numbers 3 to 1 (i.e, 3, 2, 1). Nowhere did I get the impression from these two examples that it meant the "first number" plus any multiples of "the second minus the first" that fell in the range "second to third numbers." Granted, had I looked at the third example I would have noticed that the simple pattern of the first two examples no longer worked. This suggests, perhaps, that the order of the examples may need to be changed to make it more explicit that it is multiples of the first gap within the remaining range that is to be generated. Having a multiple of 1 in the first 2 examples makes this difficult to see. Thanks again, Tom

CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.

- Prev by Date:
**st: RE: Summarize without Min and Max** - Next by Date:
**Re: st: svmat to different datasheet** - Previous by thread:
**st: Select sample** - Next by thread:
**st: implications for studying cohorts...** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |