Let’s get familiar with the ‘guts’ and ‘brains’ behind Stata’s regression functions. You can either copy the output manually, or automate it! Let’s learn how to automate this process.
In Stata you’ll run three regressions to fill out the three rows: sysuse auto, clear We want to regress MPG (Y) on weight (x) overall and by strata of domestic vs. Let’s use the classic 1978 auto dataset that comes with Stata. Here’s one step-by-step approach that you might find helpful. Extracting the results from regressions in Stata can be a bit cumbersome. If you make your own Stata programs and loops, you have discovered the wonders of automating output of analyses to tables.