Docs
Coming from Stata
Your do-files, your data and your habits mostly carry over. Here's what to know.
What's the same
- Command names and abbreviations:
su,gen,reg,tab. ifandinqualifiers, varlists with wildcards and ranges (inc*,q1-q10).- Comments (
*,//,/* */) and line continuation (///). - Factor variables:
i.,ib3.,ib(last).,c.,#,##, with_b[2.region]. - Local and global macros,
foreach,forvalues,while,program definewithsyntaxandmarksample. - Stored results:
r(),e(),_b[],_se[],return list,ereturn list. - Missing values sort above all numbers; extended missing codes
.a–.zare kept; return codes work withcapture. .dtafiles from version 114 to 119 open directly;savewrites version 118 (Stata 14+).
What's better
- Every core, every edition. Expressions, grouping, least squares and the iterative models run in parallel, with results that don't depend on the thread count.
explainafter supported commands walks through the computation with your numbers.- Graphs take
over()andby()everywhere, andviolin,coefplot,corrplotare built in. Fonts are embedded in exports. - Publication tables:
esttabis built in, writing Word, LaTeX, Markdown or CSV. - SPSS files open with
import spss, with labels and missing-value codes intact.
What's different
- Graph syntax follows Stata's for the common cases, but not every
twowayoption is supported yet. savewrites.dtaversion 118, which Stata 14 and later open; there's no SPSS writer yet.- There's no Mata; use
matrixcommands and programs for now.
What's not there yet
Bootstrap and jackknife, ml, multilevel models, xtlogit/xtpoisson, time series (ARIMA), multiple imputation and SEM are on the roadmap. If one of these blocks you, tell us: it moves things up the list.