What kind of file(s) do I have? Look at the file extension. Starting from the top, find the first row that is for any of your files.
If you have one of these... | File Type | What to do |
---|---|---|
.zip, .tar, .gz, .rar | Zip File | Unzip it, see the tab for instructions |
.sav, .por, dta, .xpt, .stc, .sas7bdat | Software-specific | See the box "Converting Data" |
.sps, .do, .dct, .sas, .R | Syntax files, used to import | See the tab "Setup Files" |
.xls, .xlsx, .ods, .mdb, .dbf | Spreadsheet or Database | Most software can Import these |
.csv, .tsv, .tab | Delimited Text (ex. ASCII) | Most software can Import these |
.txt, .dat | Other Text (ex. ASCII) | Look at the documentation |
.xml, .json, .html | Structured Text or Markup | Look at the documentation |
Files are compressed, or zipped, to save storage space and/or to bundle several files together.
Instructions on how to unzip files:
Even though you can see what is in the .zip file, you must unzip the file before you can open the individual files in the archive.
If the extension is ".tar.gz". You will likely need to use 7-zip or another program to unzip it. Just unzip it twice (once to get rid of the .gz, and the second time to get rid of the .tar).
In some cases, you will need to download data in ASCII (text) format and use a setup file (typically .sps, .do or .sas) to get it into your software.
Many statistical packages will not run a set-up file unless you reset the Windows default setting that hides file extensions.
Comma Separated Values (CSV) is a useful file format for spreadsheets. It can be opened easily in programs like Excel.
Both SPSS and SAS can open from and save files to SPSS, Stata, and SAS without additional steps.
Data Services has a software called Stat/Transfer that can convert files from one software to another.
Best option, but WINDOWS ONLY
1. Open Stata on a Windows computer
2. In the command window, submit the below syntax;
3. Select the SPSS .sav file in the dialog box that will pop up.
4. Save the data file [in Stata format]
1. Download the installation file from CRAN ( pdf with details )
2. Install then open R ( screenshots )
3. At the prompt (>), paste the following lines and press enter,
4. Select the SPSS .sav file in the dialog box that will pop up.
5. Look for the Stata (.dta) file in the same directory.
Notes:
1. Download the installation file from CRAN ( pdf with details )
2. Install then open R ( screenshots )
3. At the prompt (>), paste the following lines and press enter,
4. Select the SAS .sas7bdat file in the dialog box that will pop up.
5. Look for the Stata (.dta) file in the same directory.
Ask a Librarian | Hours & Directions | Mason Libraries Home
Copyright © George Mason University