• Overview of Stata
  • Why buy Stata?
  • Stata Journal
  • Stat/Transfer
  • Prices


  • New purchases
  • Upgrade
  • Bookshop
  • GradPlan

  • New Zealand

  • NZ - New purchases
  • NZ - Upgrade
  • NZ - Bookshop
  • NZ - GradPlan
  • Support

  • Starting Stata
  • Stata tips - General
  • Stata tips - Graphs
  • Stata tips - Tables
  • Technical
  • Stata Courses & Training

  • Order form

    Contact us

    Suggestions for starting with Stata 13

    This document describes a few suggestions to get you started with Stata 13.

    Installing Stata from the DVD
    This is simple, just insert the DVD and follow the instructions. If you have problems please read the guide that comes with the installation DVD.

    Remember to click on the flavour of Stata that is relevant to your licence eg. if you have a Stata/IC licence then you need to click on Stata/IC. The installation dialogue box looks like the following:

    When filling in the "Stata Initialization" box, make sure that the Name and Organization name are greater or equal to 5 characters. If these names are less than 5 characters then pad the name out with other characters eg. **ANU

    Stata 13 has the complete documentation set on PDF. This can be access by:

    • Using the pulldown menus: Help>PDF documentation
    • From the online help for a specific command; just click on the hyperlink

    • Windowing and font preferences

      • Stata 13 Windows are dockable. Read the getting started manual for more information on how to do this.
      • Size the Review and Variables Windows, and the Results and Command Windows, to suit yourself.
      • You may find that the default font for the Results Windows in Stata 13 is hard to read and prefer to change it. Right click on the Results Windows , select Font and then set the font to your preferences
      • Save your preferences with Edit>Preferences>Manage Preferences> Save Preferences/...... See the "Getting Started with Stata" manual for more details.
      • Stata also comes with some preset configurations. To see these Edit>Preferences>Load Preference set

      Getting updates
      Stata is constantly adding new features and fixing any bugs. It is very easy to update your copy.

      • Type: update all

      Alternatively set the automatic updates feature. Using the pull down menu Edit>Preferences>General Preferences> and then the Internet tab, then check "Enable automatic update checking" and then set parameters.

      Checking if Stata has been successfully installed
      Download Qualification tool: click here

      Read the "Getting Started with Stata" manual for details. Using the pulldown menus: Help>PDF documentation.

      • For help on the syntax of a specific command use the help . For example, type: help correlate.
      • Search will search your Stata database for keywords. For example, type: search correlate
      • findit will look at your database for keywords and also search the net resources. The search responses may lead you to Frequently Asked Questions (FAQ) at the Stata web site or the Stata Technical Bulletins (STB) or to other information. The items printed in blue are hyperlinked to other parts of Stata or to other information. For example, type: findit correlate

      • Also, you can get technical support from Stata by email. Contact tech-support@stata.com and include your Stata licence number with your message.

      Creating a Stata dataset from Excel
      Method 1:

      Using the pulldown memu:
      File>Import>Excel Spreadsheet
      Fill in the required fields and click OK

      Method 2:

      We assume you have the variable names as labels in the top row of your Excel file in lowercase.

      • In Excel highlight all or part of the file that you want to convert to a Stata datafile, including the labels in the top row.
      • In Stata select the Data Editor button from the menu or just type edit.
      • Select /Edit/Paste or use ctrl-V to drop the Excel file into the Stata Data Editor. It should recognise that the top row of the Excel file contains the labels, which now become Stata variables. Within the Editor click on the variable name and type in a variable label.
      • Then use the dialog box for Describe, or Stata commands describe and summarize to check your data.
      • If you enter a summarize command and find that a variable has 0 cases it usually means that Stata regards it as a string variable. The easiest way to convert a string variable to numeric is to use the destring command.
      • For more help on inputting Excel files see www.stata.com/support/faqs/data/newexcel.html

      Creating a Stata dataset from other file formats

      • Method 1: Use Stat/Transfer.
      • Method 2: Save the data in another format; as an Excel file and import it using insheet.

      Running a Stata session

      • If you want to save the results of your session, set up a log file. The Stata default is a SMCL file (Stata Markup and Control Language). You may prefer to use an ASCII text file. For example, type: log using fred01.txt, text. At the end of your session close the log file with: log close.
      • You can also open a command file to keep track of all commands you issue during a session, which you could later edit into a do file. The command cmdlog using temp01 produces an ASCII text file temp01.txt. At the end of your session you close the command log file with: cmdlog close. But if you forget it will save the log file and close automatically.
      • A message at the bottom of the Results Window shows if you have log or command log files open.
      • You can also save the list of commands you used during the session by going to the icon in the Review Window and selecting Save Review Contents. This produces a Stata do file that is an ASCII file you can edit with any text editor.

      Copying Stata results to Word or Excel
      The Results Window is scrollable although it only keeps about five screens of results. If you want to copy some of the results to Word or Excel, highlight them and select /Edit/Copy Table (Shift-Ctrl-C).

      • When you drop your selection into Excel it is in columns (except where the Stata output is a bit complicated as in anova results).
      • If you drop your selection into Word you have the Stata columns separated by tabs. You could then use Word menu /Table/Convert Text to Table, and perhaps use /Table/Table AutoFormat to format your table.
      • You can also copy a graph with right click and then Copy or Ctrl-C. When you drop it into Word use menu /Edit/Paste Special. Select Picture but do not select Float over text.
      • There are also some excellent user written programs that make to easy to get results in Word and Excel eg. estout click here

      Training via the Internet

      • Stata runs interactive web-based courses including an introduction to Stata, programming in Stata, and time series using Stata. For information about the dates and costs for these courses see: http://www.stata.com/netcourse/.
      • A comprehensive set of free Stata training materials is available from UCLA at www.ats.ucla.edu/stat/stata/.

      Related publications
      Our bookshop has several publications to assist in learning Stata data management and analyses. There are many books on sale at special prices.

      More tips
      We add a new tip to our web site at the beginning of each month. For previous tips go to our page on Tips for using Stata.