Stata 11 includes
New commands -varabbrev- and -unabbrev- make it easy to temporarily
reset whether Stata allows variable-name abbreviations; see [P]
varabbrev.
That's interesting as providing further tools in this territory.
(Kit is not referring to this but to previous functionality -set
varabbrev-.)
Nick
[email protected]
Kit Baum
Nick said
Kit's point that Martin's code fails if variable abbreviation is
disallowed is undoubtedly correct, but as yet this issue has not been
a source of much misunderstanding on this list. I don't think it is at
all practical to insist that code givers should never use variable
abbreviation, not least because I wouldn't guarantee to do that
myself, for all that I agree that Kit has a strong argument.
I agree that this "polite" behavior cannot be enforced, and is
certainly not fodder for the Statalist FAQ. But I would point out, as
the maintainer of the SSC Archive, that at various times there have
been submissions of code to the SSC Archive that fail to work when
varabbrev is set to off. That is absolutely unacceptable, yet not
detectable by the user-programmer who habitually has the default
setting of varabbrev on. When those issues are detected, I have
insisted that the author rewrite their code to be more robust. I
personally think it would be good practice to avoid relying on Stata's
varabbrev (just as most users of Word have learnt not to rely on auto-
completion) in code they share with others. Abbreviating command names
is one thing; most users don't mind seeing g for generate or reg for
regress. Likewise, wild-carding of variable names is a key element of
the language. But relying on varabbrev is IMHO a bad habit, and one
that official Stata certainly should not facilitate as it does.
*
* 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/