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

Re: st: Stata fails to read all the data from a test file (was Helpagain)


From   Ron�n Conroy <[email protected]>
To   [email protected]
Subject   Re: st: Stata fails to read all the data from a test file (was Helpagain)
Date   Fri, 04 Mar 2005 11:01:28 +0000

Robin Newberry wrote:

>  There's just a
>large swath of records that aren't importing into Stata, and all
>happen to be in the "03" year.

Actually, there's a huge chunk of "02"s missing as well, plus others
(Stata is importing about 2000 records, and I have over 4000).
--

Two possibilities:

When Stata quietly finishes reading data before the end of your file, it is often because it has encountered something that it regards as an end of file. This is often a legacy from old DOS files, which regularly seem infested with this sort of junk. It is an idea to determine where Stata stops reading data, and if it has skipped a chunk of data or actually just finished before the end of the file. View the text file in a text editor set to show invisible characters. You may find some strange non-printing character there.

A text editor will zap these oddities.

The second possibility is that the dates have been read, but there is a problem with the input line, and the date has been read into another variable. This can happen if Stata mistakes a character within a variable for a delimiter. Strings not enclosed in quotes can be the culprit here, or numbers formatted with commas rather than periods as thousand-separators.



--

Ronan M Conroy ([email protected]) Senior Lecturer in Biostatistics Royal College of Surgeons Dublin 2, Ireland +353 1 402 2431 (fax 2764) -------------------- Just say no to drug reps http://www.nofreelunch.org/

--------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of The Royal College Of Surgeons in Ireland.

--------------------------------------------------------------------------------------------------------------------


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