Sync STATA programs and settings with Dropbox

December 18, 2012    Programming

With the release of STATA 12, users are allowed to install STATA across platform (linux, mac, windows) on up to three computers/user. If you frequently install/edit programs you can sync files from the ado directory, where programs are stored, across your computers using Dropbox.

Step 1: Install Dropbox

Go to Dropbox, signup for an account and install.

Step 2: Create an ado directory

Create the following directories within your dropbox directory:

  1. dropbox/ado
  2. dropbox/ado/plus – For installed ado files.
  3. dropbox/ado/personal – For personal ado files

Step 3: Edit is a file that runs every time you startup STATA. STATA will look in a variety of places for the file depending on your operating system. Type help profile for more information on where it is stored on your operating system.

This file needs to be created and edited on each system you want to sync. Here’s where you might store it on Mac and linux:

  • **Mac **/Users/[your username]/Library/Application Support/Stata/ado/personal/
  • Linux /bin/

Next you need to edit this file on each system to point at the appropriate dropbox directory. On Mac this might look like this:

sysdir set PERSONAL "~/Dropbox/ado/personal/"
sysdir set PLUS "~/Dropbox/ado/plus/"

Restart STATA and you should see something like this:

running /Users/Dan/Library/Application Support/Stata/ado/personal/ 

Dropbox does the rest – syncing across your systems. You can run an additional do file located in your dropbox folder if you want to centrally edit startup settings like setting memory or turning the ‘more’ option off.


December 18, 2012    STATA Programs

dataplink is a simple program for importing recoded data from [plink][1]. Dataplink imports genotypic data from .ped files and also imports variable names (snp names) from .map files.


ssc install dataplink


Data from plink must be exported using the following commands:

  • –recode OR –recode12
  • –tab


dataplink using "/path/to/file/without/extension"


When you specify the _filename_ do not use extensions (i.e. do not add __.ped__ or __.map__). Dataplink looks for a .map and .ped file of the same name. </div> #### Limits STATA SE and MP flavors support a maximum of 32,767 variables while IC supports 2,047. This means you can only import ~32,000 SNPs with SE/MP or ~2,000 with IC. [1]: