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

st: Importing data into Stata


From   "b. water" <[email protected]>
To   [email protected]
Subject   st: Importing data into Stata
Date   Thu, 15 Dec 2005 18:57:16 +0000

Dear all,

Stata 8.2 Window XP Pro SP2.

I want to import into Stata a data set saved as a text file, which contained data in the following structure:

Abrams (1999) 0/31 5/232
Greenland (1996) 115/2131 123/8751
Di Arozio (1999) 4/12 21/483

i.e. authors space year (in bracket) tab number nospace forward/slash nospace number tab number nospace forward/slash nospace number. I want to end up with six columns of variables in Stata i.e. authors year (without brackets) number number number number.

I am at lost as to what to do with what looks like a very structured data set and should be able to be accomplished without difficulty. I checked [U] 24 Commands to input data and [R] infile, infix and insheet for help but without success.

I tried to copy and paste into stata editor and ended up with three columns of variable i.e. authors and years, number/number and number/number. In this situation, I do not know how (beyond me - to create a do-file) to 'clean' the data e.g. 'demerging' authors and years from one column to two columns and likewise for number/number from one column to number number in two separate columns.

Would be grateful for any help and advice.

Kind regards,
bw

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee� Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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