Marx Max中文
Menu

Regression tables to Word

Open in Marx Max

Inspect the generated native Word regression table and download DOCX, full-precision CSV, Stata code, a formatting script and actual log. Both models retain the same sample and robust SEs.

Read README and download the public package into reference/, retaining reference outputs. In a fresh licensed Stata session, estimate price on weight and price on weight plus mpg on the same 74 complete cases from auto, both using vce(robust). Export a native editable Word table with labels, coefficients, robust SEs, N, R² and unit notes, plus full-precision CSV, code and this run’s log. Follow the Stata export and Python title-style step, saving current outputs under rerun/ without overwriting references. Check Word against CSV; absent terms are not zero, do not invent significance stars or causal interpretations, and reference logs are not current-run evidence.
Variable / statistic(1) Weight only(2) Add mpg
Weight (pounds)2.0441.747
Robust SE(0.390)(0.778)
Fuel efficiency (mpg)Not included-49.512
Robust SE(95.807)
Constant-6.7071946.069
Robust SE(1032.394)(4213.793)
N7474
R²0.2900.293

The dependent variable is price (US dollars). Both columns use the same complete sample and robust SEs. Three decimals, no stars and no causal interpretation. The downloadable DOCX contains a native editable table.

View the actual Word document rendering

Download editable Word (DOCX) Download the complete rerun package (ZIP)

Read this case guide

What does the table retain?

Official Stata actually estimated and exported both models on the same 74 complete cases from auto with vce(robust). Word displays three decimals while CSV retains calculation precision. Coefficients, parenthesized SEs, N, R² and unit notes originate in the same estimation. Absent mpg is labelled Not included and no stars are added.

ModelWeight coefficientRobust SEN
Weight only2.0440.390 74
Add mpg1.7470.778 74

How to edit and rerun

The native Word table has 9 rows and 3 columns, with editable labels, widths and notes. Stata fills cells directly from estimation; a standard-library Python script only removes title decoration and sets generic metadata without changing numbers. Extract into a new directory, save previous Stata work, run do analysis.do, then python finalize_word.py regression-table.docx.

The package excludes source auto data and Stata software; licensed Stata is required. clear all clears the practice session and replace overwrites named outputs. Calculation and page rendering were checked on macOS/Stata 19.5, without Windows hardware or model-run validation. The regressions do not identify causal effects.

Continue to Stata model comparison · Return to the guide