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

From |
Nick Winter <nw53@cornell.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: command option in ado programming |

Date |
Tue, 18 Nov 2003 14:40:36 -0500 |

At 06:51 PM 11/17/2003 -0800, you wrote:

I think you can do it by creating two options, sigma() and sigma2(), and then catching any user use of sigma():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)-.

syntax , [ sigma(string) SIGMA2(string) ]

if `"`sigma'"'!="" {

display as error "option sigma() not allowed; use sigma2()"

exit 198

}

...

Of course, you could also rename the option "variance()"...

--Nick Winter

--------------------------------------------------------

Nicholas Winter t 607.255.8819

Department of Government f 607.255.4530

308 White Hall nw53@cornell.edu

Cornell University falcon.arts.cornell.edu/nw53

Ithaca, NY 14853-4601

*

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

**References**:**Re: st: command option in ado programming***From:*Eddy <eddy_05831@yahoo.com>

- Prev by Date:
**st: RE: [lambda]** - Next by Date:
**st: winexec odd behaviour** - Previous by thread:
**RE: st: command option in ado programming** - Next by thread:
**st: Nested logit estimation** - Index(es):

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