Command editor
⌘ / Ctrl + Enter: run current
Stata do-file Line 1 · column 1
Run current command
Run all
Load worked command Undo
Stop run
Retry restoration
Run the command at your cursor, select several lines, or run the
full editor. Execution stops at an error. Tab leaves the editor;
Ctrl + Space shows suggestions.
Your notes
Write an interpretation, question or observation.
Saved in this browser. Use Export work for a portable copy.
Synthetic data
Data browser
Results
Graph
History
Select a column name to inspect its type, label and missing values.
Results from your commands
Clear display
Commands and changes to data
Inspect what each command changed. Loading a command into the editor
does not execute it.
↳
The dataset is loaded. Run your first command to inspect it.
Practice with three synthetic datasets, a supported set of commands,
ordinary numeric missing values, and linear regression with conventional
or HC1 robust standard errors. Regression accepts categorical variables
(i.group) and interactions: c.x##c.z includes
both continuous predictors and their product. Bare variables in
# and ## are categorical. Import your own
UTF-8 CSV, TSV or semicolon-delimited text after reviewing its variable
names and types.
The full Stata language requires Stata. This workspace does not
implement arbitrary disk paths, Excel or Stata binary files, global
macros, user-defined programs, time-series operators, weighted
estimation, clustered inference, panel estimators, merges, reshape or
user-written commands. Unsupported syntax produces an error.
Local macros, foreach lists, integer forvalues loops and nested if/else
blocks run here. Run a local's definition together with its uses: each
Run action starts a new local scope. Compound quotes, extended macro
functions and single-line programming if are not implemented. Each run
accepts up to 50,000 characters, 200 logical lines, 32 nested blocks and
1,000 operations. capture (cap), quietly (qui) and noisily (noi) work
with commands and brace-delimited blocks. Use _rc to check the last
captured return code, and confirm to check variable names and types.
Commands completed before a runtime error remain in memory; Undo
restores a prefixed block as one unit. Browser limits and Stop always
end the run, even inside capture.
Browser numeric variables use double precision. Data-changing commands
clear the fitted model here; rerun the regression before predicting.
Histogram bins and output formatting can differ from Stata. Plain
regression variable lists reject collinear models; factor specifications
identify reference, empty and redundant terms separately.
preserve keeps one temporary data copy across Run actions. Use restore
explicitly when you need it back. Native Stata also restores preserved
data when the enclosing do-file or program ends; this workspace does not
execute nested do-files or program scopes. A preserved copy is not a
permanent file backup.
A session retains up to 500 successful commands and up to 50 undo states
and 100 variables. The Results view retains up to 200 entries; larger
outputs retain fewer entries to limit memory use. Long list and
frequency tables show their first 200 rows, with complete retained
tables in the results download. Graphs and regressions require absolute
values no greater than 1e100. Rescale larger values. Your progress and
notes are stored in this browser when storage is available. They are not
uploaded. Clearing browser data removes them; export a copy you want to
keep.
Each import is limited to 1 MB, 5,000 observations, 50 columns and
100,000 cells. Keep up to three imports, with at most 1.5 MB of original
source text in total. Larger datasets retain fewer undo states to limit
memory use. The data browser displays 50 rows per page; calculations use
the full applicable sample.
String values and labels are limited to 10,000 characters each, and a
working dataset to 2 million text characters. A command that exceeds
these limits leaves the data unchanged. Saved command history is limited
to 1 million characters. Larger text also reduces retained undo states,
results and history previews; data and do-file exports retain the
accepted work.
Download the original data and your do-file into the same folder. In
Stata, change the working directory to that folder, then run the
do-file. It imports the original CSV and repeats your successful
commands.
1. Original dataset (.csv)
2. Your commands (.do)
Current data (.csv)
Results and notes (.txt)
Original imported source (.txt)
The original CSV is the starting data. The current CSV includes your
changes. Failed commands are excluded from the do-file and retained in
the results download. The complete ZIP includes editor-draft.do with
your original program. analysis.do records the successful expanded
commands, so it can reproduce the work without the original locals or
loops.
For imported data, the starting CSV contains your reviewed names and
types. The complete ZIP also retains the untouched source text and
import decisions. It includes only imported sources used by this
session. The Stata do-file declares numeric and string columns
explicitly.