Integrating StatTransfer into Stata for Linux and Unix (Mac OS)

I often use the stcmd package written by Roger Newson that allows you to read SPSS, SAS and other file types directly into Stata using the inputst  command.  While this has worked well on the PCs I use, I’ve never been able to get the program to work on my linux (Ubuntu) or unix (Mac OS) machines…until now.
It’s a simple fix:

stcmd  is expecting Stata to know the correct directory for StatTransfer. This needs to be set in your profile.do file located in the Stata application directory. You can do this by inserting the following into the profile.do:

global StatTransfer_path `”/Applications/StatTransfer13/st”‘

Once this is done, you just have to remember that the commands for the stcmd program are slightly different on the PC than they are on a linux/unix machine.  For example, on a PC to read in a SPSS file in Stata you might type:

inputst filename.sav /y

In linux/unix you would replace that  “/y” with a “-y”

Happy Stata-ing,

 

This entry was posted in Stata, StatTransfer. Bookmark the permalink.