Install Stata Linux



Installation Guide Updates FAQs Documentation Register Stata Technical services. Video tutorials Free webinars Publications. Bookstore Stata Journal Stata News. Author Support Program Editor Support Program Teaching with Stata Examples and datasets Web resources Training Stata Conferences.

  • The Stata statistical package for Unix or Linux comes in two versions: stata and xstata. If your Unix/Linux environment is character-mode, such as a telnet session, you must use stata. If you are using an XWindows environment, or a graphical interface such as KDE or Gnome, you may use xstata, which offers a graphical environment virtually.
  • In the terminal run apm install stata-exec or go to Settings Install and search for stata-exec. This package depends on language-stata, which you should be prompted to install if needed.
I needed to install STATA to collaborate with a colleague at work. The computer guy gave me the software on a disk, with an installation guide. Here are the commands I entered following those instructions:
Create a directory for Stata
# mkdir /usr/local/stata13
# ln -s /usr/local/stata13/ /usr/local/stata
Install Stata
# cd /usr/local/stata13
# /media/paul/Stata/install
Stata 13 installation
---------------------
1. uncompressing files
2. extracting files
3. setting permissions
Done. The next step is to run the license installer. Type:
./stinit
If the licensed software is Stata/IC 13, you will be able to run Stata/IC by typing
xstata (Run windowed version of Stata/IC)
stata (Run console version of Stata/IC)

Run the license installer
Install Stata Linux
./stinit
There follows some questions about user name and affiliation. 'The two lines, jointly, should not be longer than 67 characters.'
Then comes the message:
Stata is initialized.
You should now, as superuser, verify that you can enter Stata by typing
# ./stata
or
# ./xstata

I added this to my .bashrc so that stata and xstata can be used as a command directly:
export PATH=$PATH:/usr/local/stata

Install stata 16 linuxBoth command 'stata' and 'xstata' work as a normal user now.
There is an error message when running xstata:

Stata Install Ado


'Failed to load module 'canberra-gtk-module'
But this was not a problem at the start.

GNOME application launcher


I added STATA to the GNOME application lancher, by typing 'application' in the launcher, then 'main menu', 'new menu'.

R to Stata

I use R most of the time for data analysis and will export csv files to STATA.
R command to export csv files:
write.csv(dtf, 'filename.csv', row.names = FALSE, na = '.')
STATA command to import csv files:
insheet using 'filename.csv', delimiter(',')

Properly installing Stata in Linux is surprisingly cumbersome, and I’ve found that even Statacorp’s own guide is incomplete and outdated. So here’s mine.

I have installed Stata in many Linux systems, but this guide was originally written for Ubuntu 16.04.Having said that, I’ve checked that it works in many other Ubuntu-based and Arch-based distros.I have used Stata 14 here, but with minimal modifications it can be used for versions 13 through 16.I’m also assuming you have a tarball (a .tar.gz file) with the appropriate installation files for your operating system, and that you have root privileges in your system.

Table of contents

  1. Install
  2. Additional improvements
  1. Change directory to wherever you have the .tar.gz file (e.g. the Downloads folder). There, create a temporary folder to store the installation files (e.g. statainstall), and extract the installation files to that folder.
  2. Create the installation directory, and change location into it.
  3. Run the install script.

License

In order you configure the license file you just need to run ./stinit (you’ll need root privileges to write the file). Be sure to have the serial number, code and authorization. No need to disconnect from the interwebz here, even if you have an “alternative” license ;)

Add directory to path

In order to be able to launch Stata you’ll need to add the installation directory to the system path.

  1. Add one line at the end of your .bashrc file to add Stata to the unix path.
  2. You need to source your .bashrc so that the changes are effective:

    (Or you can also restart your terminal)

After adding the install directory to yout path, you should be able to run the appropriate version of Stata from the terminal, e.g.:

This launches the X-window (GUI based) version of Stata MP. You can also run Stata directly within the terminal with

Obviously you’ll need to substitute mp for whatever version you have a license for.At this point you can also delete the temporary installation folder:

It is important to check if you’re version of Stata is up to date.You can head here to find more information on updating.If you have an internet connection you can simply run update query to check automatically.However, if you have an “alternative” license you’ll want to do a manual update (i.e. without internet access).

You may run into permissions errors while attempting an update: after running update query (online updating) or update db (manual, offline updating) you can get something like

This happens due to permission issues in the install folder, but it’s easily fixed.Before attempting to update, you can either start Sata with sudo (eg. sudo xstata-mp), or temporarily change the folder’s permissions:

Mages are magical attackers, and tend to have more magical defense than physical defense. They excel at multiple-target damage, and rely primarily on Magical Attack. Mages also have healing spells, which allow them to bolster the party's defense without being in the front row. A more comprehensive list can be found on the Mage's Armor page. Mage introduction and basics The mage is probably the most squishiest class in Wartune, though he excels at tanking magical attacks because of the high MDEF bonus you get. In group arena's as well as in MP Dungeons the mage will mostly be placed in the back. 1.1 Stats I will go over this very fast. There's not alot to say about this. Wartune official website by publisher R2games.com, containing Wartune Servers, Wartune News, Wartune Forum, and Wartune Guides etc. Sign up Now and play the most exciting Strategy Hybrid MMORPG at wartune.r2games.com Now! Role-Playing, City-Building, Strategy, Turns Combat, PvP Arenas, Farming. This will be broken into two sections Healing build and caster tips. Wartune Mage Healing Build Guide by Nazgul Hello everyone! My gaming name is Nazgul and I play on server 14. I have tons of guild mates and people in world chat constantly asking me about mage advice so I thought to write a post for mages! Wartune mage build.

If you do the latter it would be advisable to revert to the default permissions with

I have identified the following potential issues you may have after installing Stata in Linux:

  1. Interface has no icons (ie. only question marks)
  2. Program doesn’t have an application menu entry (ie. can’t search for the app)
  3. Mimetype associations don’t work (ie. you can’t double click a .dta file and have it open in Stata)
  4. PDF documentation links don’t work

If you want to solve the first three of these issues at once with little messing around, you can use Daniel Bela’s stata-integration, which is a bundled Linux binary script integrating an already installed Stata instance into the desktop environment.I’ve tried the script and it works as advertised, solving all above issues.However, it runs some binaries in sudo, so you may be uncomfortable with that.

If you would rather fix these issues manually, you can check out the sections below.

Stata Install Estout

Interface icons

Although it is only a aesthetic annoyance, it is annoying to have an interface with no icons:

My good friend and colleague at the NBER, Kyle Barron, has written a fix for this issue. The main advantage of Kyle’s solution is that it doesn’t require sudo privileges.

Unity launcher and desktop file

Even after successfully installing and running Stata, in Ubuntu it won’t be available as an application in the dash, and it won’t have a proper icon in the application launcher. We can easily fix this by creating a .desktop file for Stata.

In this newly-created file just copy and paste the following, obviously adjusting it if you have a different version or flavor of Stata:

After saving this file you should be able to find Stata from the Unity dash, and when launched it should have its icon.

Adding mimetype associations

Adding mimetype associations for Stata files allows you to see Stata files (e.g. do files, dta files) with their proper icons, and more importantly, to be automagically opened in Stata when executed. This is the default behavior in Windows or Mac, but with Linux we have to do a bit of extra work.

Install Stata Linux Software

  1. First download this tarball with Stata icons and extract it wherever you like.

  2. In the terminal, go to the location where you have extracted the icons and then change directory to the PNG icons that correspond to your version of Stata. Then issue the following commands:
  3. Create and edit the mimetype definitions with the following command:

    Then copy the following inside this newly created file, and save.

  4. Finally, update the mime and desktop databases so that changes take effect.

That’s it! You should now have a fully functional, “pretty” version of Stata on your Linux system. With a bit of extra work, you can complete the job and add mimetype associations for more obscure Stata files. For instance, I’ve associated do and ado files to be opened up by Atom (my preferred text editor in Linux), as well as sthlp What's a reefer party. files (useful for when you’re documenting a program).

PDF documentation

The PDF manuals are loaded by a script named stata_pdf, located inside your Stata installation directory (eg. /usr/local/stata15/stata_pdf).By default the script points to Acrobat Reader (acroread), but Adobe discontinued it around 2014 (good riddance). We can make some edits to stata_pdf so that it uses Evince, which is the default PDF reader in many Linux distros.

First, it always advisable to backup the original file:

Install Stata Linux Commands

Now we edit the script with nano (or whatever you prefer):

Stata Download

Scroll past the commented text and modify it so that it reads like the following block.It boils down to three edits: cmd='evince' in second line and the first two wharg=...

Install Stata 16 Linux

  • If you have a dark GTK+ theme enabled (e.g. the dark variant of Arc, my theme of choice), the X-window version of Stata looks awful. I tried solving this by executing xstata with a different GTK theme; i.e. something like

    but apparently GTK+ 3 applications have to be coded to respect the GTK_THEME Wii sports resort download iso deutsch. env variable, and Stata is not. I suspect some answers in this and this questions might contain possible solutions, but I just switched to a light variant of Arc and called it a day.