Warning: At the time of this writing (May 2015), the procedure is not available for the 64 bit version of Stata 13.
Once usespss is installed, you can read your SPSS file with the following command: If you have not yet installed it, typeĪnd follow the directions given. With Stata 12 or some earlier version, the easier way is to use the user-written routine usespss. Note that with later versions (currently, this is version IBM SPSS 22) things seem to work well. However, with IBM-SPSS version 19 problems may occur with the file simply not being written. If you have access to SPSS, you may save your file in Stata format and then use this version in Stata.
One of these is using software designed specifically to convert files from one format to another, such as Stat/Transfer or DBMS copy. However, there are a number of workarounds. Use var1 var17 if id <= 1000 using name-of-data-file Data from other statistics softwareīy default, Stata is not prepared to read data from other statistical packages. Will load only cases with a value less than or equal to 1000 in variable id.īoth types of command may be combined, such as in Use if id <= 1000 using name-of-data-file Will load only the three variables mentioned into your working memory. Use var1 var17 var38 using name-of-data-file "Limiting" the data may refer to the variables used and/or to the selection of a subsample of cases. If you know from the outset that you need only parts of a data set, you may request Stata to limit the data to be loaded. Single quotation marks won't do the trick. Important note: If one or several of the directories or the name of the data set contain empty spaces (blanks), they have to be placed within double quotation marks. Another way is to change to the pertinent directory first and then to "use" the data file: Where you have to fill in your directory and data set name. Use c:\mydirectory\mysubdirectory\name-of-data-file If the data set can be found somewhere else, you may write, for instance Up to now, I have assumed that the data are in your working directory, which normally is called "data" on a Windows PC. If you are already using another data set and want to replace it (either having saved it or not wanting to save it) with the new data set, you will write: If you want to use an already existing Stata system file (with extension ".dta"), the appropriate command is Not valid unless obtained from the OpenClinica document management system on the day of use.WLM-Stata - Read Data Internet Guide to Stata If you have such issues, the script in 4 can be modified (hints in the documentation) to overcome these issues at the processing stage.Īpproved for publication by Ben Baumann. Most common problems are too long variable names and not permitted characters in variable names. Regardless, if developing a study that will be analyzed in STATA, try to follow naming requirements that will comply with STATA requirements for variable naming. It is shared with with permission of the author.
The script and how to use it is documented. The script automaticaly detects the required user-defined STATA command. dta dataset with fully labeled variables and coded lists.
You can use this script that does similar work as the utility, except works offline and not as thoroughly. Some folks at the Murdoch Children’s Research Institute in Australia have created a helpful utility here which combines the. Similarly to this effect, it is fairly straightforward to convert an SPSS data file (. If all you want is raw data and don’t care about the variable labels, coded value lists, etc:Įxtract SPSS format, then unzip it to the STATA working directory. The following describes some methods for bringing OpenClinica datasets into STATA. Stata is a commonly used tool for statistical analysis. 2.9 Importing OpenClinica Data into STATA