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

RE: Convert an SPSS file (was: Re: st: simple question)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: Convert an SPSS file (was: Re: st: simple question)
Date   Mon, 5 Jul 2004 17:14:48 +0100

Dirk Enzmann
 
> I wrote an SPSS script (for SPSS version 9+) that can be used 
> to convert 
> an SPSS data file (.sav) to a Stata data file (.dta). Among 
> others, it 
> will keep the SPSS MD codes distinct (and will keep its labels).
> 
> It can be downloaded from:
> 
> http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbei
> ter/Enzmann/Software/Enzmann_Software.html
> Enzmann_Software
> 
> (look for SPSS2stata.sbs)
> 
> However, I encountered the following problems:
> - variable names containing the character $ have to be renamed

Yes indeed. 

> - variable names and labels containing a German "umlaut" (�, 
> �, �, �, �, 
> �, �) are not possible in Stata (really?)

Others can comment better than I can. 

> - values of string variables cannot be declared as missing (true?)

Untrue. Empty strings "" are missing so far as string variables
are concerned. 

> - non-integer numeric values cannot get labels attached (right?)

Correct. 

> Thus, the script will rename variables containing the character $ 
> (changing $ to d) and will translate a German "umlaut" like � 
> to ue. If 
> SPSS short string variables had been declared as missing, a 
> note will be 
> attached to the respective Stata variable; likewise if non-integer 
> values had value labels in SPSS.
> 
> Any solutions or hints to solve the a.m. problems in a better way are 
> welcome.

Nick 
[email protected] 

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