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

st: RE: Transfering multiple data to stata format.


From   "Copeland, Laurel A" <[email protected]>
To   <[email protected]>
Subject   st: RE: Transfering multiple data to stata format.
Date   Thu, 1 Sep 2005 14:07:58 -0500

I found these on the web. 
HTH. Good luck. -Laurel Copeland

(1) This solution pertains to Excel to SAS, but I expect you could adapt
it. You still have to write the lines for each dataset.
http://www.sconsig.com/sastips/tip00162.htm
Solution #1 by 
Jack Hamilton
Email: [email protected]

Write a DBMS/Copy command file instead of entering the parameters
through the GUI. 
 It's described in the DBMS/Copy manual.
 The command file would contain multiple segments looking like this:

 compute;
 in=c:\temp3\book1.xls7
    out=c:\temp3\book1.sd2;
 run;

(2) UCLA proposes this approach using SPSS and then Stata
(http://www.ats.ucla.edu/stat/stata/faq/convert_pkg.htm):
- In SPSS use File Save As to make a comma separated file (.csv) and
then in Stata use the insheet command to read the .csv file in Stata.
- In SPSS use File Save AS to make a .xpt file and then in Stata use the
fdause command to read the .xpt file.
 
(3) If you have access to SAS, you can use SAS engines to read in the
SPSS and write out the Stata datasets directly.  If you are pretty good
with SAS, you can write a macro to handle a set of files efficiently.
http://www.columbia.edu/acis/eds/data_tools/dbmseng.html?print


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Thursday, September 01, 2005 1:21 PM
To: [email protected]
Subject: st: Transfering multiple data to stata format.

Hi,
I have several data sets in spss format that I want to convert into
stata format.
I am using dbms copy v7 to do the job. But it won't accept multiple
inputs.
It is painfull to select one by one.
Is there any efficient, faster way to code this?
Many thanks in advance.
Amadou Bassirou DIALLO.
*
*   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/

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