STATAverse

The practice workspace

Stata practice

Runs in your browser. A guided Stata subset.
No account needed.

Loading the practice workspace… Reload this page

Command editor

⌘ / Ctrl + Enter: run current
Stata do-fileLine 1 · column 1

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

Saved in this browser. Use Export work for a portable copy.

Data in memory

Synthetic data
Select a column name to inspect its type, label and missing values.

The dataset is loaded. Run your first command to inspect it.

Commands available here

This workspace implements a small teaching subset of Stata. Calculations use the data in memory. It does not run Stata itself.

Open the official Stata manuals ↗

Browser practice and Stata

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.

Import a dataset

Preview a CSV, TSV or semicolon-delimited file. It stays in this browser and is not uploaded.

File requirements and storage limits

Use UTF-8 text, up to 1 MB, 5,000 observations, 50 columns and 100,000 cells per file. Keep up to three imported datasets, with original sources totaling 1.5 MB. Your source and import decisions remain available for export.

From source rows to a group statistic

Continue your work in Stata

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.

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.