Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: transforming a variable


From   "Hans J. Baumgartner" <[email protected]>
To   statalist <[email protected]>
Subject   st: transforming a variable
Date   Mon, 06 Jan 2003 16:30:31 +0100

Hi,
I would like to transform a variable that contains regional classifications in the form of 333000 into 9333. That is, to drop the last three digests and ad a leading 9.

I have solved this problem mathematically by dividing with 1000 and adding 9000. However, since this is a classification category I would like to tackle the problem the way described above.

Any suggestions?

Thanks
Hans

--
Hans J. Baumgartner Deutsches Institut f�r Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research
Abt. Staat / Dept. Public Economics
K�nigin-Luise-Str. 5; 14195 Berlin (Dahlem) Tel.: 030/89789-307; Fax.: 030/89789-114
http://www.diw.de


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




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index