Stata: Data Analysis and Statistical Software
   >> Home >> Products >> Training >> NetCourses >> NC151: Introduction to Stata Programming

NetCourse® 151: Introduction to Stata Programming

Content:
An introduction to Stata programming dealing with what most statistical software users mean by programming, namely, the careful performance of reproducible analyses.

Through a combination of lectures, example applications, and carefully chosen problems, the course addresses the full range of methods and techniques necessary to be most productive in the Stata environment.
Course lecturer:
Bill Gould, president of StataCorp and head of development
Course leaders:
Kerry Kammire, technical services analyst at StataCorp
Jared Stewart, technical services representative at StataCorp
Course length:
6 weeks (4 lectures)
Dates:
July 5–August 16, 2013 (details)
Prerequisites:
  • Stata 12, installed and working
  • Basic knowledge of using Stata interactively
  • Internet web browser, installed and working
    (course is platform independent)
Price:
$125.00
Enroll
Can’t wait for the scheduled course? Enroll in NCNow151

Course content

Lecture 1: Organization of analysis

  • Welcome
  • Entering and executing a program
  • Mechanical method 1: The do-file
    Aside: Stata's built-in Do-file Editor
  • Mechanical method 2: The interactive program command
  • Mechanical method 3: program in a do-file
  • Mechanical method 4: Combination do-files
  • Mechanical method 5: Ado-files
    Aside: Using Stata and an editor or word processor
  • Organizing do-files
  • An individual do-file
  • A do-file to perform verification
  • Infiling data
    Aside: Working with datasets that are too large
  • Reproducibility
  • Indexing
  • assert as an alternative to branching
  • Consuming calculated results

Lecture 2: Macros, arguments, and looping

  • Introduction
  • Macros
  • How macros might be used
  • Macro names
  • The related-persons example
  • Another example (plant data)
  • Potential problem—variable scope
  • More on arguments
  • Branching and looping
  • Physical program style
  • foreach
  • Looping across observations
  • if

There is a one-week break between Lectures 2 and 3 in this course because we have found that the extra time is necessary for discussion.


Lecture 3: Examples and applications

  • Introduction
  • Data management example
  • Handling time and date variables
  • Checking assumptions
  • Returned values and saving results
    • What can be returned in r()?
    • Referring to returned results in other programs
    • Referring to returned results in the program that sets them
  • Bootstrapped standard errors
  • Aside: reading a trace
  • A warning on bootstrapping
  • Speeding up bootstrapping
  • Bootstrapping, how to
  • Monte Carlo simulations
  • postfile and post
  • Using quietly
  • Speeding up simulations

Lecture 4: Ado-files

  • Introduction
  • A first real ado-file
  • discard
  • More improvements to doanl
  • capture
  • The exit command
  • Making doanl a general tool
  • Writing a help file for doanl
  • Do-files, programs, and ado-files: when to use which
  • Temporary variables
  • Temporarily destroying data
  • Temporary files
  • An analysis-specific ado-file
  • General-purpose (GP) ado-files
  • A GP ado-file
  • Fine tuning display output
  • Stata syntax
  • syntax
  • varlist macro
  • syntax’s other specifiers
  • Whether to use syntax
  • A note on quotes
  • Version control

Enroll in NC151

Bookmark and Share 
NetCourses
Overview
Schedule
Enroll
FAQ
NC101
NC151
NC152
NC461
What is NetCourseNow?
Sample lecture
User comments
Like us on Facebook Follow us on Twitter Follow us on LinkedIn Google+ Watch us on YouTube
Follow us
© Copyright 1996–2013 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index   |   View mobile site