Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: are Macro variable always possible ?

From   daniel klein <>
Subject   Re: st: are Macro variable always possible ?
Date   Sun, 28 Aug 2011 21:59:18 +0200


think about creating an indicator variable instead of defining a macro.

For example you could code

. g byte filter = (var1=="hello") & (var2==1) & (var3==43) &
(var6=="hello again") & !missing(var34)
. reg Y X if filter


John wrote :
I would like to define a macro variable which stores a long sequence
of data restrictions that I use after any IF qualifier when a function
allows it ..

For example instead of writing

 regress Y X if var1=="hello"&var2==1&var3==43&var6=="hello
again"&!missing(var34) ,
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index