Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: syntax : keep variables listed in ìf'


From   SCHOUMAKER Bruno <bruno.schoumaker@uclouvain.be>
To   statalist@hsphsun2.harvard.edu
Subject   st: syntax : keep variables listed in ìf'
Date   Tue, 13 Jul 2010 09:34:30 +0200

Hello,

I am using the syntax to prepare a stata command (ado file). I used the [if] in the syntax.

I would like find an easy way to extract the names of the variables appearing in the macro ìf'.

Let's say my macro `if' contains "if v106>2 & v011==4", I would like to create a macro containing just "v106 v011".

Actually, I only want to keep the subset of variables appearing in the syntax before running the program, so if there is a way to do that, I would be very very very interested.

Thanks

Bruno

--
Bruno SCHOUMAKER

Centre de recherche en démographie et sociétés
Université catholique de Louvain
1-17 PLace Montesquieu
1348 Louvain-la-Neuve
BELGIUM

Tel. +32 10 474136
Fax. +32 10 472952

bruno.schoumaker@uclouvain.be
www.uclouvain.be/demo

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index