Skip to content

Recent Posts

  • How to Pass your Comprehensive Exams
  • Glossary of Common Academic Acronyms and Jargon (Canada & U.S.)
  • Five Online Tools for Doing Social Research
  • Writing Prompts to Overcome Writer’s Block
  • Please stop starting letters like this…

Most Used Categories

  • Publishing (4)
  • Writing (8)
  • Design (6)
  • Methods (18)
    • Software (11)
      • STATA (1)
      • SPSS (10)
    • Statistics (6)
    • Qualitative (1)
  • General Advice (5)
Skip to content

Practical Advice for Research, Writing, and Academia’s Hidden Curriculum

Subscribe
  • General Advice
  • Writing
  • Methods
    • Qualitative
    • Quantitative
  • Software
    • SPSS
    • STATA
  • Publishing
  • Podcast
  • Home
  • Methods
  • Software
  • STATA
  • The Basics of STATA

The Basics of STATA

Phyllis L. F. RippeyJanuary 21, 2021March 8, 2022

There are three main types of files used in Stata:
Data File: Filename.dta  
Syntax File: Filename.do  
Output file: Filename.log

The data file is where all the data live. The syntax is where you tell STATA what to do with your data. The output is where you see the results of what you told Stata to do.

You can also tell Stata what to do and see results in the main screen in Stata, but you can only give one command at a time and they don’t get saved in the big screen for you to go back to. That’s why it’s a good idea to stick with a .do file where you can have a complete set of commands to tell Stata what to do (perhaps this is why it’s called a .do file ¯\_(ツ)_/¯).

A completed .do file might look something like this:

and the output for it might look something like this:

Here are some barely legible tips on how to set up a syntax (.do) file in Stata.

Post navigation

Next: Chi-Square in SPSS
Copyright All Rights Reserved | Theme: BlockWP by Candid Themes.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.