Programming features

Sophisticated parsing

Looping and branching

Markup and control language

Access to internal system variables

Binary and text file I/O

ODBC/SQL support

Access to files on the Internet

List processing

Path and file utilities

Extensive set of functions for string and data manipulation, including regular expressions and Unicode

Window management

Automation

 

Object-oriented programming

Inheritance

Encapsulation of data structures and programs

Program-name overloading

 

Menu language

Add items to existing menus

Add new menus

Create dialog interfaces

 

Long string/BLOB support

Up to 2,000,000,00-character long strings

Binary “string” (BLOBs)

Import entire files into BLOBs/long strings

Export files from BLOBs/long strings

 

Unicode support*

UTF-8

Translation of extended ASCII to UTF-8

Unicode-aware string functions

Locale-based sorting and string comparison

Watch Unicode in Stata.

 

Project Manager

Handle dozens or hundreds of scripts at once

Portable project file/collections for working on multiple computers or sharing with colleagues

Programming utilities for…

Debugging programs

Measuring convergence

Marking relevant sample

Saving results**

Handling time-series variables

Confirming variable types

Controlling display formats

Parsing factor variables**

 

Extensibility

Ability to add new commands to Stata

Ado: scripting language

Mata: C/C++ like compiled (byte-code) matrix programming language

Mata: object-oriented programming

Open development environment: access to the same programming tools StataCorp developers use

Access to source of many Stata commands and Mata functions

Plugins (DLLs or shared objects)

Java plugins—call Java libraries directly from Stata

 

Dynamic document generation

Create HTML files with embedded Stata code, output, and graphs

Markdown

Watch Automatic production of web pages from dynamic Markdown documents.

 

Creation of Word, Excel, and PDF files

High-level creation of Word documents containing Stata results and graphs

Low-level programmatic access for fine-control creation of Word documents 

High-level creation of PDF files containing Stata results and graph

Low-level programmatic access for fine-control creation of PDF files

High level import/export of full Excel worksheets

Low-level cell-by-cell access to write results to and read data from Excel, including graphs, formulas, date formats, currency formats, bold, italics, and more.

Watch Create Word® documents from within Stata.

Watch Create PDF reports from within Stata.

 

Additional resources

An Introduction to Stata Programming by Christopher F. Baum

NetCourse 151: Introduction to Stata Programming

NetCourse 152: Writing your Own Stata Commands