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

RE: st: command option in ado programming


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: command option in ado programming
Date   Tue, 18 Nov 2003 09:20:39 -0000

I don't think there is a way round this,
so long as you use -syntax- to parse input.
The rule is that capitalisation signals
acceptable abbreviation, and Stata does
not identify the "2" as upper case.

It's not the answer you seek, possibly,
but if this were my problem I would flag
the choice much more obviously by a choice
between -sd()- and -var()-. Names are
more fundamental than notation, here
at least.

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

Eddy

> The problem was/is, I wish to have an option like -sigma2(z)-, and I
> want users to specify exactly -sigma2(z)-, not -sigma(z)- or
> something else; that is, the "2" is important. [This is because the
> option parameterizes sigma^2 (the variance), which should be
> carefully distinguished from sigma (the standard
> deviation).] I tried
> something like
>
>   syntax varlist, SIGMA2(string)
>
> , but it seems that the "2" is not binding, so that if users
> specify -sigma(z)-, Stata does not complain and treats it as if the
> user specifies -sigma2(z)-, which is a result I want to avoid. That
> is, I wish Stata would complain if the user inadvertently specifies
> -sigma(z)-.
>

*
*   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