Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: revising -rename- [was:RE: st: quick question]


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: revising -rename- [was:RE: st: quick question]
Date   Thu, 26 Feb 2004 16:53:08 +0000

At 16:28 26/02/04 +0000, Nick Cox wrote:
If that were my program I would throw the request
straight back at the user. I would never indulge
a list with an odd number of names.

The reason -parmest- and -parmby- don't throw the request back is that they are often used in programs which call an estimation command which takes a non-trivial amount of real time to converge. I would not want to throw away all that work just because the user has inadvertently specified an extra name to -rename()- . However, I would agree that an error-level diagnostic is the way to go if an odd number of names is given to a Syntax 2' of -rename-. (And possibly even for -descsave-.)

Roger


Roger Newson
>
> For what it's worth, I prefer Syntax 2', because, that way,
> it is clear
> which oldname is to be replaced with which newname. That is
> why I used
> (essentially) Syntax 2' in the -rename()- options of
> -descsave-, -parmest-
> and -parmby- (available either on SSC or on my website as
> specified in my
> signature). However, if you use Syntax 2', then it is
> probably a good idea
> to include a diagnostic in the case of an odd number of names, such as
>
> Warning: odd number of variable names in rename list - last
> one ignored
>
> (as used by my programs) or possibly a stronger error-level
> diagnostic.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
  or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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