StatTransfer is a software utility that converts data files from one proprietary format to another.
All major statistical formats are supported like SAS [.sps], Stat [.dta], SPSS [.sav], and Excel [.xls].
About StatTransfer
- List of all formats supported by StatTransfer.
- StatTransfer is located in the
"Quantitative Apps" program menu on all CUIT PCs
and the DSSC workstations. - StatTransfer is also available on CUNIX, see below for details.
- For information about acquiring a copy or StatTransfer refer to the CUIT software page.
In the Windows version navigate among screens with different functionality using
the tabs
across the top of the StatTransfer window.
This information introduces
the basics with details available using the "help" button on each screen.
Doing a Simple Transfer
- On the opening screen
use the pull down menus to specify:- format of input file,
- location of input file,
- format of output file,
- location of output file (only if you want to change the defaults.
Then click on the transfer button and you are done.
By default, all variables and cases are selected.
Use the tabs to move to screens for changing the defaults.
The 'Variables' Tab
- On the "Variables" screen
customize the output by:- check to see what variables are recognized on the input file
- select variables using variable list and the "keep" and "drop" buttons;
- Change to format of specific variables using the "factor type" buttons,
- minimize the space needed for the output using the "optimize" button
The 'Observations' Tab
- This screen allows you to customize cases.
Each of these operations is documented and can be done from this screen:- select cases by setting filters,
- set missing values,
- select cases by row number,
- select based on random or fixed sampling methods.
The 'Options' Tabs
- The options tabs allow for changing the default handling for specific types
of variable types or formats.
- Options(1) handles permissions, variable names and labels, missing values and date fields.
- Options(2) handles the options for reading in ASCII files.
- Options(3) handles the options for reading SAS files.
- Options(4) handles the output options for SAS and options for JMP and R files.
Stat/Transfer on the Cunix Cluster
To start Stat/Transfer, type st at the $ prompt. Once the program is started, you will see the Stat/Transfer internal st> prompt.
Getting Help in Stat/TransferYou can type help for a brief syntax and format guide:
st> help
For further help type:
help commands For help on the root Stat/Transfer commands
help copy For help on copying one format to another
help formats For help on the formats you can transfer
help set For help on 'setting' options
help running For help on running S/T from a shortcut or an OS prompt
st>
Moving Data from One Format to Another
The syntax to copy files from one format to another is
copy file1.ex1 file2.ex2
where ex1 and ex2 are the proper extensions for each filetype. >
Note that Stat/Transfer assumes the file type based on the file extension. Type help formats for the accepted list. If your file has some other extension, you need to rename it. You can do this inside Stat/Transfer with a shell command, i.e., a unix command preceded by an exclamation mark. For example:
! mv mystuff.exp mystuff.por
Examples of using Stat/Transfer
-
To copy an Spss portable file to a Stata dataset, type
the following:
copy mygss00.por nygss00.dta -
To copy an comma delimited file to a SAS dataset, type
copy myraw.csv myraw.sas7bda
Stat/Transfer can use value labels stored in a PROC FORMAT libraries, however, these labels must first be converted to a special format. To do this, run the following SAS program:
libname mylib "[path]";
proc format library=mylib cntlout=mylib.sas_fmts;
run;
where "path" is the full path to the directory that contains your format library. You must us ".sas_fmts" as the file name. The resulting file will have the name sas_fmts.sas7bdat.
Once you have prepared the format library, you must set two options within Stat/Transfer:
set read-sas-fmts yes
set read-fmt-name sas_fmts.sas7bdat
Now you are ready to do the transfer. For example:
copy mydata.sas7bdat mydata.por
Note that Stat/Transfer cannot convert all types of SAS PROC FORMAT definitions. In particular, you will lose definitions of the type:
VALUE DAYFMT 0 = 'DIDNT HAVE WAIT'
1-24 = 'LESS THAN 1 DAY'
24-48 = '1 UP TO 2 DAYS';

