Dear all,
I would like to generate new variables using this command:
for var X1-X50 :replace X_new=1 if X=="New"
But some Xi variables are numeric because empty
This command stops when one of the Xi is numeric
How can I ask to execute this command only for string Xi variables ? Is
there a "format" function which returns the type of the variable ? If this
exists, I could use:
for var X1-X50 :replace X_new=1 if X=="New" & format(X)==string
Thank you
Alvine Bissery
*****************************************************
Alvine BISSERY
Ing�nieur statisticien
Service de Biostatistique des Hospices Civils de Lyon
162 Avenue Lacassagne
69424 Lyon Cedex 03 - France
t�l: +33 4 72 11 57 55
fax: +33 4 72 11 51 41
*
* 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/