NC151

-

Introduction to Stata Programming

Become an expert in organising 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 stored estimation results can speed up your work and lead to more complete analyses. Learn about bootstrapping and Monte Carlo simulations, too.

Next class:

Oct 10, 2019

to

Nov 21, 2019

Can't wait? Want work on your own schedule?  Register for the same course with NetCourseNow.

Lesson 1: Organisation of analysis

  • Welcome

  • Entering and executing a program

  • The do-file

  • The interactive program command

  • A program in a do-file

  • Combination do-files

  • Ado-files

  • Organizing do-files

  • An individual do-file

  • A do-file to perform verification

  • Infiling data

  • Reproducibility

  • Indexing

  • assert as an alternative to branching

  • Consuming calculated results

Lesson 2: Macros, arguments, and looping

  • Welcome

  • Entering and executing a program

  • The do-file

  • The interactive program command

  • A program in a do-file

  • Combination do-files

  • Ado-files

  • Organizing do-files

  • An individual do-file

  • A do-file to perform verification

  • Infiling data

  • Reproducibility

  • Indexing

  • assert as an alternative to branching

  • Consuming calculated results

Lesson 3: Examples and applications

  • Data management example

  • Handling time and date variables

  • Checking assumptions

  • Returned values and storing 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

Lesson 4: Ado-files

  • 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

Course pre-requisites

  • Stata 15 installed and working.

  • Basic knowledge of using Stata interactively

  • Internet web browser, installed and working
    (course is platform independent)

Australia

+61 2 6247 0177

sales@surveydesign.com.au

Survey Design and Analysis Services Pty Ltd

ABN 37 051 831 826

PO Box 5044

LYNEHAM ACT 2602

AUSTRALIA

  • White Facebook Icon
  • White LinkedIn Icon
  • White Twitter Icon

New Zealand

+64 9 889 2231

sales@surveydesign.co.nz

Need help with your purchase? 

Email us and we will reply as soon as we are in the office.

Need advice on Stata - Call us on Skype now

© 2018 by Survey Design and Analysis Services Pty Ltd