Docs
Getting started, and moving from Stata
Install
Download the single static binary for your platform from the latest release (Linux x86-64/arm64, macOS Apple silicon/Intel, Windows x64) and place it on your PATH. Zero runtime dependencies; free up to 1,000 observations.
regwright --version regwright licence install RW1.… # optional: Pro, CI/Server, Team or Site key
Run a do-file
regwright run analysis.do # prints the log to the terminal regwright -b do analysis.do # batch: writes analysis.log next to it, like stata -b regwright # interactive prompt
Datasets are resolved the way Stata resolves them: relative to the do-file's folder, or the folder you cd into. For sysuse/webuse, point Regwright at a dataset directory with --data-dir or the REGWRIGHT_DATA environment variable.
In CI (GitHub Actions, GitLab, Jenkins)
- uses: Huckcity/regwright-action@v1
with: { licence: ${{ secrets.REGWRIGHT_LICENSE }} }
- run: regwright -b do code/master.do
The exit status is non-zero when the do-file stops with an error, and the log ends with r(#); exactly as Stata's would, so a failing replication fails the build. Read the full GitHub Actions CI guide.
What carries over unchanged
- Do-file syntax: comments,
///,#delimit, macros (local, global, nested, extended functions), loops,if/else,capture,quietly,by/bysort, user programs withsyntaxandreturn. .dtafiles from Stata 13 to 19 (formats 117–119), with value labels, variable labels, notes, and strLs — read and written.- Output layout: tables print like Stata's, so diffs against existing replication logs are meaningful.
- Missing values
.and.a–.z, storage types (byte, int, long, float, double, str#, strL), and float-precision behaviour.
Current coverage & differences
| Area | Status in v0.1.0 |
|---|---|
| Core regression, panel & data management | 501 commands live (regress, areg, ivregress, logit, probit, xtreg, reghdfe, merge, collapse, reshape, egen). See compatibility. |
| Graphs | Partial — core SVG graphics (twoway, scatter, lfit, histogram) run in the CLI and playground (28.5% of [G] manual examples). Advanced styling and unsupported subcommands halt cleanly. |
| Mata | Partial — 47.6% of [M] manual examples match today; complex user-written Mata classes and compiled C plugins are still in progress. |
| Specialist estimators | Unsupported commands or options stop immediately with a clear error message; nothing is skipped silently. |
| User-written (SSC) packages | Pure ado-language programs work; packages relying on missing Mata features or C plugins will not run yet (ssc auto-installer is not yet built). |
| Random numbers & numeric precision | Core OLS passes the NIST StRD Longley benchmark to 15 significant digits. Same set seed syntax, though matching Stata's exact internal RNG stream is still in progress — results depending on random draws can differ. |
How we test
Every example printed in the Stata manuals (14,192 examples across 32 manuals) is replayed and compared word for word with Stata's printed output; see evidence. Replication packages from Harvard Dataverse are run and compared against their authors' Stata logs.
Stata is a registered trademark of StataCorp LLC. Regwright is an independent implementation by ALGD LTD (NI744090) and is not affiliated with StataCorp.