Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
Subject | st: Change roman to Arabic numerals |
Date | Fri, 17 Dec 2010 10:50:05 -0800 |
A colleague wants to generate Arabic numbers from Roman numerals and I was = wondering if anyone has written a routine for this. She only has I to X so= I suggested Gen numb=3D(rom=3D=3D"I")+2*(rom=3D=3D"2")+3*(rom=3D=3D"3")+4*(rom=3D=3D"4"= ) etc. This is OK for this application, but not if we have many numbers. Of course the ordering gets messed up - I, II, III, IV, IX, V, VI, VII, VIII, X so= encode won't work and gen numb=3Dreal(rom) won't do either. Happy holidays. Tony Peter A. Lachenbruch Department of Public Health Oregon State University Corvallis, OR 97330 Phone: 541-737-3832 FAX: 541-737-4001 * * 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/