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

st: RE: [programming] using -if- in do file


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: [programming] using -if- in do file
Date   Thu, 12 Dec 2002 15:57:22 -0000

FEIVESON, ALAN
>
> Hello - Is there a way to restrict observations over which a do-file
> operates without using the -syntax- command? The syntax
> command allows [if]
> and [in] options, but is extremely picky about using
> numbers or non existent
> variable names in the argument list. Therefore I'd rather
> check for the -if-
> condition directly. I assume there must be some system
> macro which stores
> the -if- or -in- condition. How can I get it without using
> -syntax- ?
>

In addition to Nick Winter's comment,
a short answer is that -- with a .do
file -- you can't do this easily
and you're better not trying to do
it at all.

With an .ado file, -syntax- really is
the best way.

Nick
[email protected]

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index