I know this sounds quite weird after Stata 16 was released, but anyway I made a package called importsav which converts SPSS file to Stata with the help of R packages haven, foreign and bit64.
to install the package.
will also work if you installed user-written package github.
The key difference between importsav and other user-written packages such as importspss or usespss is that the support of non-English labels in both variables and values. Although Stata has officially supported this feature since version 16, importsav would still be an alternative for users with older versions of Stata.
In order to use importsav, you need to install R on your system first. But after that, there is no need of running R at all. The essential idea underlying importsav is not to interrupt your workflow within Stata. With this command, you don’t need to escape Stata for data conversion. importsav will automatically write and execute R code for you.
Acknowledgement:
This program owes a lot to importspss by Gabriel Rossman, whereis by Germán Rodríguez and rcall by E. F. Haghish. I am grateful for their informative programs.
Disclaimer:
I tested importsav 3.0 with Stata 14 and 15 on Windows and earlier version of importsav with Stata 15 on macOS. Please let me know if it goes wrong.
Code:
net from https://raw.githubusercontent.com/jh-min/importsav/master
Code:
github install jh-min/importsav
The key difference between importsav and other user-written packages such as importspss or usespss is that the support of non-English labels in both variables and values. Although Stata has officially supported this feature since version 16, importsav would still be an alternative for users with older versions of Stata.
In order to use importsav, you need to install R on your system first. But after that, there is no need of running R at all. The essential idea underlying importsav is not to interrupt your workflow within Stata. With this command, you don’t need to escape Stata for data conversion. importsav will automatically write and execute R code for you.
Acknowledgement:
This program owes a lot to importspss by Gabriel Rossman, whereis by Germán Rodríguez and rcall by E. F. Haghish. I am grateful for their informative programs.
Disclaimer:
I tested importsav 3.0 with Stata 14 and 15 on Windows and earlier version of importsav with Stata 15 on macOS. Please let me know if it goes wrong.
Comment