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

st: How to read in an irregular ASCII-file?


From   "Barbara Hofmann" <[email protected]>
To   [email protected]
Subject   st: How to read in an irregular ASCII-file?
Date   Wed, 12 Jan 2005 12:14:07 +0100

Hello,

hopefully someone of you can help me with the following:

i want to read in a ascii-dataset of a structure like this:

104525300010   9064496 022    999929912
204525300010   9064496 1:19 59 22  2:4 0 96   3:8 0 92  4:0 33 67
204525300010   9064496            6:30 50 20  7:78 5 17
104525300010   9081400 023    23131122
104525300020             7    332321332 06 00 05 2264
104525300020             8    221211121 06 00 09 1889
104525300020             8    222222222 06 00 08 4705
104525300020             8    231211222 06 00 06 4585


"2" in the first column means that this line belongs to the line before. column 31-39 include replies to 9 different questions. if it is a "9" this means, that in the following line there is a more specific answer to this question which is stored like this:
7:78 5 17 means "78% replied to question 7 with a "1", 5% replied to question 7 with a "2" and 17% replied to question 7 with a "3""

Then ":" signalizes that the answers to the question of the number before ":" will follow. How can i tell Stata this meaning of ":"? Maybe also a problem could be that the answers can be like "10 90 0" as well as like "15 15 70" or "5 5 90"?

Does anybody have an idea how to read in those dates?

Many thanks!

Barbara Hofmann
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201

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