Stata QuickStart

Stata is a general-purpose statistical software package from StataCorp that is designed to support research in many disciplines.

  • Disciplines
     
     
  •  Behavioral sciences
    Biostatistics
    Data science
  • Economics
    Education
    Epidemiology
  • Finance, business, and marketing
    Institutional research
    Medicine
  • Political science
    Public health
    Public policy
  • Sociology
     

Stata 17 is downloadable at apps.kennesaw.edu and is available for Mac, Windows and Linux.  It is a one package install for your local machine.  No extra modules or difficulty in managing packages. 

stata windows labels

  • Individual commands can be entered in the command window
  • A do file contains a set of commands.
  • The data editor lets view and manipulate your data table.
  • Run your Do file with the Do button

To save your local work for use on the HPC:

  • Do-files can be saved from the do-file window as a .do file.

  • Data can be saved from the data editor in a .dta file. 

To test your Stata job in an interact session:

  • $ interact
  • $ module load Stata
  • $ cd cd <your working directory>
  • $ stata-se -b do <your do file>
  • $ less <dofilename.log>
    • Example: $ less wage_educ.log

Example PBS file to submit your job to the scheduler:

#!/bin/bash
#PBS -l nodes=1:ppn=2
#PBS -j oe
#PBS -N Stata_Job
#PBS -q batch
#PBS -l walltime=00:10:00
#PBS -m abe
#PBS -M netid@kennesaw.edu


module load Stata
cd <yourworkingdirectory>
stata-se -b do <yourdofile.do>

exit 0

To submit the job: $ qsub run_stata.pbs

To view the results file: $ less wage_educ.log

Need help?  

  1. In the Command window in Stata, enter "man stata"
  2. At the bottom of the page, click on the Other resources link for Videos, FAQs, Blogs, Training, Webinars and more.

2023 Spring: Stata Workshop - Slides & Video

©