Search
   >> Home >> Products >> Training >> NetCourses >> NetCoursesNow >> NCNow151: Introduction to Stata Programming

< Return to NetCourses
Training

NetCourseNowTM 151: Introduction to Stata Programming

$250.00 1st enrollee
+200 each 2nd–5th enrollees
+100 each 6th–Nth enrollees

For enrollments of 11 or more participants, please contact us.

NetCourseNow is a self-paced, personalized learning experience. All lectures will be posted at once, and you will be given the email address of your personal NetCourse instructor, to whom you can email questions about the lectures. Enroll now, and begin when you're ready.

Content:
Become an expert in organizing your work in Stata. Make the most of Stata's scripting language to improve your workflow and create concretely reproducible analyses. Learn how branching, looping, flow of control, and accessing saved estimation results can speed up your work and lead to more complete analyses. Learn about bootstrapping and Monte Carlo simulations, too.

Prerequisites:

  • Stata 13 or Stata 12, installed and working
  • Basic knowledge of using Stata interactively
  • Internet web browser, installed and working
    (Course is platform independent)

Course content

Lecture 1: Organization of analysis

  • Mechanics of using do-files, ado-files, and program define
  • Programming as automating data-management and analysis
  • Organization of multiple do-files
  • Ensuring reproducibility
  • Data verification (assert)
  • Debugging (trace)
  • Working with datasets too large to fit in memory
  • Indexing (subscripting) observations
  • assert as an alternative to branching
  • Reading and processing relational datasets
  • Consuming calculated results

Lecture 2: Macros, arguments, and looping

  • Using macros to contain strings
  • Using macros to contain numbers
  • Using macros to pass and receive arguments with do-files
  • Using macros to pass and receive arguments with programs
  • Distinction between local and global macros
  • Branching and looping
  • Program style
  • Shifting over lists
  • Looping across observations
  • Application: Listing data neatly (report writing and use of display)

 

Lecture 3: Examples and applications

  • Do-files, ado-files, and programs: when to use which
  • Complicated data management example: processing hospital admission/discharge data and merging with patient file
  • Working with dates
  • Working with dates and time of day
  • Programming bootstrapped standard errors
  • Programming Monte Carlo simulations
  • Use of postfile to program bootstraps and simulations beyond the capabilities of bootstrap and simulate

Lecture 4: Ado-files

  • Organizing files and directories
  • Writing real ado-files: command to run analysis do-files
  • Automatically logging analysis
  • Putting time-and-date stamps on analyses
  • Error handling
  • Writing on-line help files
  • Temporary variables
  • Temporarily destroying data
  • Temporary files
  • Analysis-specific ado-files
  • General-purpose ado-files
  • Converting analysis-specific to general-purpose ado-files
  • More on display and producing formatted output
  • Parsing commands with syntax
  • Version control
The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube