Programming Reference Manual

Publisher: Stata Press
Copyright: 2017
ISBN-13: 978-1-59718-247-8
Pages: 691
Supplemental materials

Table of contents
intro Introduction to programming manual

automation Automation

break Suppress Break key
byable Make programs byable

capture Capture return code
char Characteristics
class Class programming
class exit Exit class-member program and return result
classutil Class programming utility
comments Add comments to programs
confirm Argument verification
continue Break out of loops
creturn Return c-class values

_datasignature Determine whether data have changed
#delimit Change delimiter
dialog programming Dialog programming
discard Drop automatically loaded programs
display Display strings and values of scalar expressions
dynamic tags Dynamic tags for Markdown documents
dyndoc Convert dynamic Markdown document to an HTML file
dyntext Process Stata dynamic tags in text file

ereturn Post the estimation results
error Display generic error message and exit
estat programming Controlling estat after user-written commands
_estimates Manage estimation results
estimation command How to program an estimation command
exit Exit from a program or do-file

file Read and write text and binary files
file formats .dta Description of .dta file format
findfile Find file in path
foreach Loop over items
forvalues Loop over consecutive values
fvexpand Expand factor varlists

gettoken Low-level parsing

if if programming command
include Include commands from file

java Java plugins
javacall Call a Java plugin

levelsof Levels of variable

macro Macro definition and manipulation
macro lists Manipulate lists
makecns Constrained estimation
mark Mark observations for inclusion
markdown Convert Markdown document to an HTML file
matlist Display a matrix and control its format
matrix Introduction to matrix commands
matrix accum Form cross-product matrices
matrix define Matrix definition, operators, and functions
matrix dissimilarity Compute similarity or dissimilarity measures
matrix eigenvalues Eigenvalues of nonsymmetric matrices
matrix get Access system matrices
matrix mkmat Convert variables to matrix and vice versa
matrix rownames Name rows and columns
matrix score Score data from coefficient vectors
matrix svd Singular value decomposition
matrix symeigen Eigenvalues and eigenvectors of symmetric matrices
matrix utility List, rename, and drop matrices
more Pause until key is pressed

nopreserve option nopreserve option
numlist Parse numeric lists

pause Program debugging command
plugin Load a plugin
postfile Post results in Stata dataset
_predict Obtain predictions, residuals, etc., after estimation programming command
preserve Preserve and restore data
program Define and manipulate programs
program properties Properties of user-defined programs
Project Manager Organize Stata files
putdocx Generate Office Open XML (.docx) file
putexcel Export results to an Excel file
putexcel advanced Export results to an Excel file using advanced syntax
putpdf Create a PDF file

quietly Quietly and noisily perform Stata command

_return Preserve stored results
return Return stored results
_rmcoll Remove collinear variables
rmsg Return messages
_robust Robust variance estimates

scalar Scalar variables
serset Create and manipulate sersets
set locale_functions Specify default locale for functions
set locale_ui Specify a localization package for the user interface
signestimationsample Determine whether the estimation sample has changed
sleep Pause for a specified time
smcl Stata Markup and Control Language
sortpreserve Sort within programs
syntax Parse Stata syntax
sysdir Query and set system directories

tabdisp Display tables
timer Time sections of code by recording and reporting time spent
tokenize Divide strings into tokens
trace Debug Stata programs

unab Unabbreviate variable list
unabcmd Unabbreviate command name

varabbrev Control variable abbreviation
version Version control
viewsource View source code

while Looping
window programming Programming menus and windows
window fopen Display open/save dialog box
window manage Manage window characteristics
window menu Create menus
window push Copy command into Review window
window stopbox Display message box

Combined author index
Combined subject index