| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: import SPSS files
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.
Peggy
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?);
and
(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
http://www.ats.ucla.edu/stat/stata/faq/convert_pkg.htm
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: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
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
conditions.
*
* 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/