Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: import SPSS files

From   P chrisman <>
Subject   Re: st: import SPSS files
Date   Tue, 04 Jul 2006 18:08:15 -0700

I cannot verify whether the file is comma-delimited or tab-delimited as I do not have SPSS. If I did I would be able to do this without the assistance of those more knowledgeable than I. I have only Stata and R available to me. Thanks for the assistance and the link.

Clive Nicholas wrote:

You obviously didn't look at -whelp insheet- close enough! Had you done,
you'll have noticed there are two rather neat options for -insheet-: -tab-
and -comma-. For instance, try this:

(1) make sure that your SPSS file is comma-delimited (easy enough,
especially when (re-)opening the .sav file in SPSS as I recall);

(2) move what should now be your .csv file into "C:/data", where all your
Stata .dta files ought to be (if not, why not?);


(3) open up Stata and type -insheet using file.csv, comma-.

More details on this and how to convert datafiles from other formats into
Stata (and back again) are available at

There, you'll learn something quite important. The UCLA-ATS crew don't
make this explicit, although Michael Blasnik did in a post to this list a
couple of years back: Stata doesn't care where the file comes from: it
only cares about what format it comes in! Your SPSS file could just as
well have originated from MS Excel or Epidata. Once it's told the
_format_, it can ably do the rest.

Hope that helps.

CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e:
Newcastle University |

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather

* For searches and help try:

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index