Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Problems imputting data


From   Phil Schumm <pschumm@uchicago.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Problems imputting data
Date   Tue, 7 May 2013 09:21:13 -0500

On May 7, 2013, at 7:08 AM, Miguel Angel Duran wrote:
> Hi, Statalisters. I am trying to import data into Stata. I have used two methods. First, I have tried to import from a .txt file using -insheet-. Second, I have tried to copy and paste from an Excel file on the data editor. Nevertheless, in both cases, although the original file has 8303 observations, Stata just gets about a third of them (and not the first third). Using the second method Stata informs me that "You attempted to paste one or more string values into numeric variables. The contents of these cells, if any, are unchanged".
> 
> Will anyone please help me to know what is going on and how I can solve this?


Assuming you are using Stata 12, you should use the -import excel- command.  Not only is this easier, but it will avoid some of the problems you can encounter with the methods you describe above.  Try that first, and if you are still having problems, let us know.


-- Phil


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index