Skip to content
vikjam edited this page Feb 8, 2016 · 23 revisions

This page contains some tips and suggestions for the various languages used in this repository

Stata

The simplest way to use Stata is simply to use the app. If you prefer to not use the do-file editor that comes with Stata, your text editor of choice will probably have some support for Stata syntax and possible additional features. For example, Sublime Text has a couple of packages, Sublime Stata Enhanced and Stata Editor. See the Sublime Text tips below for details. It is also possible to interact with Stata from the command line by installing the command line tools. You can then invoke Stata with the command, stata-se (or something similar based on your version of Stata).

R

You can use the app accompanied with your R installation, but it is generally advisable to use an improved R IDE such as RStudio, which is free to use. R can be invoked from the command line via the command R. See below for Sublime Text support.

Python

There are many ways to get started with Python. A simple approach for people interested in using Python for data analysis is to install an IDE for Python such as Anaconda, Python(x,y) or Canopy from Enthought.

You can also install everything directly.

Installing Python without an IDE

Mac OS X

You already have Python installed on OS X, but it's best to get the latest version of Python and not mess around with your system Python. One way is to use a Python manager such as pyenv, which you can install with Homebrew:

brew update
brew install pyenv

Make sure to follow the instructions on pyenv for adding shims to your .bash_profile or .bash_rc. It's helpful to use something like the Scipy Superpack to install all the libraries used in Python for data analysis.

Julia

Julia does not come with much of interface, but Juno provides a nice graphical interface. IJulia provides another alternative to interacting with Julia. Quantitive Economics has a nice guide to setting up Julia.

Reading Stata files into Julia

DataRead provides the ability to read Stata files directly into Julia. In order to install it, you'll first need to install some dependencies.

Mac OS X

With OS X, you can install the necessary dependencies with the following:

brew update
brew install ragel libiconv
git clone git clone https://github.com/WizardMac/ReadStat.git
cd ReadStat
make
sudo make install

Then you can install DataRead in Julia,

julia> Pkg.clone("https://github.com/WizardMac/DataRead.jl.git")
Clone this wiki locally