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, 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 <>
Subject   st: syntax : keep variables listed in ìf'
Date   Tue, 13 Jul 2010 09:34:30 +0200


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.




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

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

*   For searches and help try:

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