Base Reference Manual

This manual includes features that are part of StataNow™.


Publisher: Stata Press
Copyright: 2023
ISBN-13: 978-1-59718-395-6
Pages: 3,292
Suggested citation

StataCorp. 2023. Stata 18 Base Reference Manual. College Station, TX: Stata Press.

Supplemental materials

Table of contents
Intro Introduction to base reference manual


about Display information about your Stata
ado update Update community-contributed packages
ameans Arithmetic, geometric, and harmonic means
anova Analysis of variance and covariance
anova postestimation Postestimation tools for anova
areg Linear regression with many indicator variables StataNow
areg postestimation Postestimation tools for areg


betareg Beta regression
betareg postestimation Postestimation tools for betareg
binreg Generalized linear models: Extensions to the binomial family
binreg postestimation Postestimation tools for binreg
biprobit Bivariate probit regression
biprobit postestimation Postestimation tools for biprobit
bitest Binomial probability test
bootstrap Bootstrap sampling and estimation
bootstrap postestimation Postestimation tools for bootstrap
boxcox Box–Cox regression models
boxcox postestimation Postestimation tools for boxcox
brier Brier score decomposition
bsample Sampling with replacement
bstat Report bootstrap results


centile Report centile and confidence interval
churdle Cragg hurdle regression
churdle postestimation Postestimation tools for churdle
ci Confidence intervals for means, proportions, and variances
clogit Conditional (fixed-effects) logistic regression
clogit postestimation Postestimation tools for clogit
cloglog Complementary log–log regression
cloglog postestimation Postestimation tools for cloglog
cls Clear Results window
cnsreg Constrained linear regression
cnsreg postestimation Postestimation tools for cnsreg
constraint Define and list constraints
contrast Contrasts and linear hypothesis tests after estimation
contrast postestimation Postestimation tools for contrast
copyright Display copyright information
Copyright Apache Apache copyright notification
Copyright autolink autolink copyright notification
Copyright Boost Boost copyright notification
Copyright flexmark flexmark copyright notification
Copyright Hamcrest Hamcrest copyright notification
Copyright H2O H2O copyright notification
Copyright ICD-10 ICD-10 copyright notification
Copyright ICU ICU copyright notification
Copyright JAXB JAXB copyright notification
Copyright JGoodies Common JGoodies Common copyright notification
Copyright JGoodies Forms JGoodies Forms copyright notification
Copyright JSON JSON for Modern C++ copyright notification
Copyright jsoup jsoup copyright notification
Copyright LAPACK LAPACK copyright notification
Copyright libHaru HARU copyright notification
Copyright libpng libpng copyright notification
Copyright Mersenne Twister Mersenne Twister copyright notification
Copyright MiG Layout MiG Layout copyright notification
Copyright Parsington Parsington copyright notification
Copyright PolyHook PolyHook copyright notification
Copyright ReadStat ReadStat copyright notification
Copyright Scintilla Scintilla copyright notification
Copyright slf4j slf4j copyright notification
Copyright ttf2pt1 ttf2pt1 copyright notification
Copyright Win32 Dark Mode Copyright Win32 Dark Mode copyright notification
Copyright zlib zlib copyright notification
correlate Correlations of variables
cpoisson Censored Poisson regression
cpoisson postestimation Postestimation tools for cpoisson
cumul Cumulative distribution
cusum Cusum plots and tests for binary variables


db Launch dialog
demandsys Estimation of flexible demand systems
demandsys postestimation Postestimation tools for demandsys
Diagnostic plots Distributional diagnostic plots
display Substitute for a hand calculator
do Execute commands from a file
doedit Edit do-files and other text files
dotplot Comparative distribution dotplots
dstdize Direct and indirect standardization
dtable Create a table of descriptive statistics
dydx Calculate numeric derivatives and integrals


eform_option Displaying exponentiated coefficients
eivreg Errors-in-variables regression
eivreg postestimation Postestimation tools for eivreg
Epitab Tables for epidemiologists
Error messages Error messages and return codes
esize Effect size based on mean comparison
estat Postestimation statistics
estat classification Classification statistics and table
estat gof Pearson or Hosmer–Lemeshow goodness-of-fit test
estat ic Display information criteria
estat summarize Summarize estimation sample
estat vce Display covariance matrix estimates
estimates Save and manipulate estimation results
estimates describe Describe estimation results
estimates for Repeat postestimation command across models
estimates notes Add notes to estimation results
estimates replay Redisplay estimation results
estimates save Save and use estimation results
estimates selected Show selected coefficients
estimates stats Model-selection statistics
estimates store Store and restore estimation results
estimates table Compare estimation results
estimates title Set title for estimation results
Estimation options Estimation options
etable Create a table of estimation results
exit Exit Stata
exlogistic Exact logistic regression
exlogistic postestimation Postestimation tools for exlogistic
expoisson Exact Poisson regression
expoisson postestimation Postestimation tools for expoisson


fp Fractional polynomial regression
fp postestimation Postestimation tools for fp
fracreg Fractional response regression
fracreg postestimation Postestimation tools for fracreg
frontier Stochastic frontier models
frontier postestimation Postestimation tools for frontier
fvrevar Factor-variables operator programming command
fvset Declare factor-variable settings


gllamm Generalized linear and latent mixed models
glm Generalized linear models
glm postestimation Postestimation tools for glm
gmm Generalized method of moments estimation
gmm postestimation Postestimation tools for gmm
grmeanby Graph means and medians by categorical variables


hausman Hausman specification test
heckman Heckman selection model
heckman postestimation Postestimation tools for heckman
heckoprobit Ordered probit model with sample selection
heckoprobit postestimation Postestimation tools for heckoprobit
heckpoisson Poisson regression with sample selection
heckpoisson postestimation Postestimation tools for heckpoisson
heckprobit Probit model with sample selection
heckprobit postestimation Postestimation tools for heckprobit
help Display help in Stata
hetoprobit Heteroskedastic ordered probit regression
hetoprobit postestimation Postestimation tools for hetoprobit
hetprobit Heteroskedastic probit model
hetprobit postestimation Postestimation tools for hetprobit
hetregress Heteroskedastic linear regression
hetregress postestimation Postestimation tools for hetregress
histogram Histograms for continuous and categorical variables


IC note Calculating and interpreting information criteria
icc Intraclass correlation coefficients
Inequality Inequality, poverty, and other distributional summaries
intreg Interval regression
intreg postestimation Postestimation tools for intreg
ivfpoisson Fractional probit model with continuous endogenous covariates
ivfpoisson postestimation Postestimation tools for ivfpoisson
ivpoisson Poisson model with continuous endogenous covariates
ivpoisson postestimation Postestimation tools for ivpoisson
ivprobit Probit model with continuous endogenous covariates
ivprobit postestimation Postestimation tools for ivprobit
ivqregress Instrumental-variables quantile regression
ivqregress postestimation Postestimation tools for ivqregress
ivregress Single-equation instrumental-variables regression
ivregress postestimation Postestimation tools for ivregress StataNow
ivtobit Tobit model with continuous endogenous covariates
ivtobit postestimation Postestimation tools for ivtobit


jackknife Jackknife estimation
jackknife postestimation Postestimation tools for jackknife


kappa Interrater agreement
kdensity Univariate kernel density estimation
ksmirnov Kolmogorov–Smirnov equality-of-distributions test
kwallis Kruskal–Wallis equality-of-populations rank test


ladder Ladder of powers
level Set default confidence level
Limits Quick reference for limits
lincom Linear combinations of parameters
linktest Specification link test for single-equation models
lnskew0 Find zero-skewness log or Box–Cox transform
log Echo copy of session to file
logistic Logistic regression, reporting odds ratios
logistic postestimation Postestimation tools for logistic
logit Logistic regression, reporting coefficients
logit postestimation Postestimation tools for logit
loneway Large one-way ANOVA, random effects, and reliability
lowess Lowess smoothing
lpoly Kernel-weighted local polynomial smoothing
lroc Compute area under ROC curve and graph the curve
lrtest Likelihood-ratio test after estimation
lsens Graph sensitivity and specificity versus probability cutoff
lv Letter-value displays


makespline Spline generation
margins Marginal means, predictive margins, and marginal effects
margins postestimation Postestimation tools for margins
margins, contrast Contrasts of margins
margins, pwcompare Pairwise comparisons of margins
marginsplot Graph results from margins (profile plots, etc.)
Maximize Details of iterative maximization
mean Estimate means
mean postestimation Postestimation tools for mean
mfp Multivariable fractional polynomial models
mfp postestimation Postestimation tools for mfp
misstable Tabulate missing values
ml Maximum likelihood estimation
mlexp Maximum likelihood estimation of user-specified expressions
mlexp postestimation Postestimation tools for mlexp
mlogit Multinomial (polytomous) logistic regression
mlogit postestimation Postestimation tools for mlogit
more The —more— message
mprobit Multinomial probit regression
mprobit postestimation Postestimation tools for mprobit


nbreg Negative binomial regression
nbreg postestimation Postestimation tools for nbreg and gnbreg
nestreg Nested model statistics
net Install and manage community-contributed additions from the Internet
net search Search the Internet for installable packages
netio Control Internet connections
nl Nonlinear least-squares estimation
nl postestimation Postestimation tools for nl
nlcom Nonlinear combinations of parameters
nlsur Estimation of nonlinear systems of equations
nlsur postestimation Postestimation tools for nlsur
npregress intro Introduction to nonparametric regression
npregress kernel Nonparametric kernel regression
npregress kernel postestimation Postestimation tools for npregress kernel
npregress series Nonparametric series regression
npregress series postestimation Postestimation tools for npregress series
nptrend Test for trend across ordered groups


ologit Ordered logistic regression
ologit postestimation Postestimation tools for ologit
oneway One-way analysis of variance
oprobit Ordered probit regression
oprobit postestimation Postestimation tools for oprobit
orthog Orthogonalize variables and compute orthogonal polynomials


pcorr Partial and semipartial correlation coefficients
permute Permutation tests
pk Pharmacokinetic (biopharmaceutical) data
pkcollapse Generate pharmacokinetic measurement dataset
pkcross Analyze crossover experiments
pkequiv Perform bioequivalence tests
pkexamine Calculate pharmacokinetic measures
pkshape Reshape (pharmacokinetic) Latin-square data
pksumm Summarize pharmacokinetic data
poisson Poisson regression
poisson postestimation Postestimation tools for poisson
postest Postestimation Selector
predict Obtain predictions, residuals, etc., after estimation
predictnl Obtain nonlinear predictions, standard errors, etc., after estimation
probit Probit regression
probit postestimation Postestimation tools for probit
proportion Estimate proportions
proportion postestimation Postestimation tools for proportion
prtest Tests of proportions
pwcompare Pairwise comparisons
pwcompare postestimation Postestimation tools for pwcompare
pwmean Pairwise comparisons of means
pwmean postestimation Postestimation tools for pwmean


QC Quality control charts
qreg Quantile regression
qreg postestimation Postestimation tools for qreg, iqreg, sqreg, and bsqreg
query Display system parameters


ranksum Equality tests on unmatched data
ratio Estimate ratios
ratio postestimation Postestimation tools for ratio
reg3 Three-stage estimation for systems of simultaneous equations
reg3 postestimation Postestimation tools for reg3
regress Linear regression
regress postestimation Postestimation tools for regress
regress postestimation diagnostic plots Postestimation plots for regress
regress postestimation time series Postestimation tools for regress with time series
reri Relative excess risk due to interaction
#review Review previous commands
roc Receiver operating characteristic (ROC) analysis
roccomp Tests of equality of ROC areas
rocfit Parametric ROC models
rocfit postestimation Postestimation tools for rocfit
rocreg Receiver operating characteristic (ROC) regression
rocreg postestimation Postestimation tools for rocreg
rocregplot Plot marginal and covariate-specific ROC curves after rocreg
roctab Nonparametric ROC analysis
rreg Robust regression
rreg postestimation Postestimation tools for rreg
runtest Test for random order


scobit Skewed logistic regression
scobit postestimation Postestimation tools for scobit
sdtest Variance-comparison tests
search Search Stata documentation and other resources
serrbar Graph standard error bar chart
set Overview of system parameters
set cformat Format settings for coefficient tables
set_defaults Reset system parameters to original Stata defaults
set emptycells Set what to do with empty cells in interactions
set iter Control iteration settings
set rng Set which random-number generator (RNG) to use
set rngstream Specify the stream for the stream random-number generator
set seed Specify random-number seed and state
set showbaselevels Display settings for coefficient tables
signrank Equality tests on matched data
simulate Monte Carlo simulations
sj Stata Journal installation instructions
sktest Skewness and kurtosis test for normality
slogit Stereotype logistic regression
slogit postestimation Postestimation tools for slogit
smooth Robust nonlinear smoother
spearman Spearman's and Kendall's correlations
spikeplot Spike plots and rootograms
ssc Install and uninstall packages from SSC
stem Stem-and-leaf displays
stepwise Stepwise estimation
Stored results Stored results
suest Seemingly unrelated estimation
summarize Summary statistics
sunflower Density-distribution sunflower plots
sureg Zellner's seemingly unrelated regression
sureg postestimation Postestimation tools for sureg
swilk Shapiro–Wilk and Shapiro–Francia tests for normality
symmetry Symmetry and marginal homogeneity tests


table intro Introduction to tables of frequencies, summaries, and command results
table oneway One-way tabulation
table twoway Two-way tabulation
table multiway Multiway tables
table summary Table of summary statistics
table hypothesis tests Table of hypothesis tests
table regression Table of regression results
table Table of frequencies, summaries, and command results
tabstat Compact table of summary statistics
tabulate oneway One-way table of frequencies
tabulate twoway Two-way table of frequencies
tabulate, summarize() One- and two-way tables of summary statistics
test Test linear hypotheses after estimation
testnl Test nonlinear hypotheses after estimation
tetrachoric Tetrachoric correlations for binary variables
tnbreg Truncated negative binomial regression
tnbreg postestimation Postestimation tools for tnbreg
tobit Tobit regression
tobit postestimation Postestimation tools for tobit
total Estimate totals
total postestimation Postestimation tools for total
tpoisson Truncated Poisson regression
tpoisson postestimation Postestimation tools for tpoisson
translate Print and translate logs
truncreg Truncated regression
truncreg postestimation Postestimation tools for truncreg
ttest t tests (mean-comparison tests)


update Check for official updates


vce_option Variance estimators
view View files and logs
vwls Variance-weighted least squares
vwls postestimation Postestimation tools for vwls


which Display location of an ado-file
wildbootstrap Wild cluster bootstrap inference


xi Interaction expansion


zinb Zero-inflated negative binomial regression
zinb postestimation Postestimation tools for zinb
ziologit Zero-inflated ordered logit regression
ziologit postestimation Postestimation tools for ziologit
zioprobit Zero-inflated ordered probit regression
zioprobit postestimation Postestimation tools for zioprobit
zip Zero-inflated Poisson regression
zip postestimation Postestimation tools for zip
ztest z tests (mean-comparison tests, known variance)


Combined author index
Combined subject index