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 at the end of May, and its replacement, is already up and running.

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

st: assigning same number to slightly different string var.

From   "Philip Hantschk" <>
Subject   st: assigning same number to slightly different string var.
Date   Tue, 01 Nov 2011 11:53:09 +0100


i have a set of data containing names of indices, like S&P 500, Dax 30 etc. I want to assign numbers to the indices, so that S&P 500=1, Dax 30=2 etc. The problem is, that the in the observations, S&P 500 has different ways of writing, e.g. Standard and Poor's 500, S&P 500, S&P 500 Index, etc. 

My question is, is there a way to assign numbers automatically, like tell Stata to give every observation that contains "500" the "1".

Thanks for your consideration,

Philip Hantschk
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren:
*   For searches and help try:

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