help usespss                                                dialogs:  usespss  
-------------------------------------------------------------------------------

Title

usespss -- Use SPSS dataset

What is supported: ------------------------------- files in SPSS-system format (*.sav) platforms: Windows or Unix/Mac compressed and non-compressed data long variable names variable labels value labels for numerical variables extended missing values variable formatting (for numerical variables only) types optimization

What is (currently) NOT supported: ---------------------------------------- SPSS portable format files SPSS/PC format files DEC PDP files value labels for short strings (not supported by Stata) information regarding weighting in SPSS file

Syntax

Load SPSS-format dataset

usespss using filename [, clear saving(filename) iff(condition) inn(condition) memory(memsize) lowmemory(memsize)]

Describe SPSS-format dataset

desspss using filename [, clear]

Note that if your filename contains embedded spaces, enclose it in double quotes.

Description

usespss loads an SPSS-format dataset into memory. Extension must be specified in filename. The word "using" may be omitted in the current version of usespss, but is likely to be required in the later versions.

Version 1.0 does not allow a subset of the variables to be read. If and in conditions must be specified within iff and inn options.

Options

clear specifies that it is okay to replace the data in memory, even though the current data have not been saved to disk.

saving specifies that a particular filename must be used for the result of the conversion. One command

. usespss using "filename.sav",saving("filename.dta")

is generally faster than the following sequence

. usespss using "filename.sav" . save "filename.dta"

memory(memsize) specifies that immediately after conversion the memory size must be set to memsize megabytes. memory() implies clear.

lowmem(memsize) specifies that during conversion Stata must allocate memsize megabytes. lowmem() is ignored if memory is not specified. Default value for lowmem() is 1 megabyte. lowmem() is supposed to be lower than memory().

Author

Sergiy Radyakin DECRG, The World Bank, Washington DC, USA sradyakin(at)worldbank.org

Examples

. desspss using "myfile.sav"

. usespss using "myfile.sav", . usespss using "myfile.sav", clear . usespss using "myfile.sav", clear saving("myfile.dta") . usespss using "myfile.sav", clear iff(myvar<threshold) inn(1/500) . usespss using "myfile.sav", clear saving("myfile.dta") lowmem(10) memory(300)

Also see

Online: use, sysuse, fdause