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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

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

Subject |
RE: st: RE: egen & sum() |

Date |
Wed, 26 Nov 2008 10:29:28 -0000 |

See my posting earlier in the thread for an answer to most of this. It is not customary to mention outdated names in the -help-. This question gets asked about once a year on Statalist; that's not enough to justify bloating the help further. (Neil being a Unix person calls it -man-.) Although it's StataCorp call, there is no obvious reason why any of the old names should ever stop working. The most obvious reason for change is that StataCorp might want to reclaim some of them, but as said they are now considered objectionable. Historians of Stata will recall that as each -egen- function is defined in an ado file whose name begins "_g" -egen- functions in the olden days when all files to be acceptable to DOS had to fit an 8 + 3 filename.ext pattern had to be no more than _6_ characters long. Naturally that no longer bites. Nick n.j.cox@durham.ac.uk Neil Shephard Martin Weiss wrote: > See - help whatsnew8to9- and search for "sum()" > > "The following egen functions have been renamed: > > old name new name > ------------------------ > any() anyvalue() > eqany() anymatch() > neqany() anycount() > rfirst() rowfirst() > rlast() rowlast() > rmean() rowmean() > rmin() rowmin() > rmiss() rowmiss() > robs() rownonmiss() > rsd() rowsd() > rsum() rowtotal() > sum() total() > ------------------------" > Thanks Martin, your memory is clearly better than mine to remember that from 2005! I thought that might have been the case and had read -man whatsnew- but hadn't gone back further (I also neglected to state that I'm using Stata 10.1 born 11 Aug 2008) I just checked a few others and it seems that the old names are still valid (see continued examples below), presumably to provide a degree of backwards compatability when running scripts under old versions? . clear . set obs 10 obs was 0, now 10 . gen a = _n . gen b = sum(a) . egen b2 = sum(a) . egen b3 = total(a) . egen c = rmean(b b2 b3) . egen c2 = rowmean(b b2 b3) . egen d = rlast(b b2 b3) . egen d2 = rowlast(b b2 b3) . egen e = rmin(b b2 b3) . egen e2 = rowmin(b b2 b3) . list +-------------------------------------------------------------+ | a b b2 b3 c c2 d d2 e e2 | |-------------------------------------------------------------| 1. | 1 1 55 55 37 37 55 55 1 1 | 2. | 2 3 55 55 37.66667 37.66667 55 55 3 3 | 3. | 3 6 55 55 38.66667 38.66667 55 55 6 6 | 4. | 4 10 55 55 40 40 55 55 10 10 | 5. | 5 15 55 55 41.66667 41.66667 55 55 15 15 | |-------------------------------------------------------------| 6. | 6 21 55 55 43.66667 43.66667 55 55 21 21 | 7. | 7 28 55 55 46 46 55 55 28 28 | 8. | 8 36 55 55 48.66667 48.66667 55 55 36 36 | 9. | 9 45 55 55 51.66667 51.66667 55 55 45 45 | 10. | 10 55 55 55 55 55 55 55 55 55 | +-------------------------------------------------------------+ Should these synonyms be mentioned in -man egen- or will they quietly fade away in subsequent releases? (I guess Stata Corp. are the only people who might answer that). * * 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/

**References**:**st: egen & sum()***From:*Neil Shephard <nshephard@nhs.net>

**st: RE: egen & sum()***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**Re: st: RE: egen & sum()***From:*Neil Shephard <nshephard@nhs.net>

- Prev by Date:
**Re: st: RE: egen & sum()** - Next by Date:
**re:st:re: egen and sum()** - Previous by thread:
**Re: st: RE: egen & sum()** - Next by thread:
**RE: st: RE: egen & sum()** - Index(es):

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