* 示例任务:供用户在新会话中运行,由 Stata 执行,不读取个人研究文件。 * 已核对 Stata 19.5;输入 auto,输出两组回归与比较表;没有外部依赖。 * Marx Max example: compare two linear regressions using Stata's bundled auto data. * Input: sysuse auto. No user research files or external packages required. * Output: regression output and a model comparison in the Results window/log. * Sample: complete cases on price, weight, mpg. Both models use robust SEs. * Run in a fresh practice session: clear replaces data currently in memory. * No random operation or seed. No causal interpretation is implied. sysuse auto, clear describe price weight mpg summarize price weight mpg generate byte sample = !missing(price, weight, mpg) regress price weight if sample, vce(robust) estimates store baseline regress price weight mpg if sample, vce(robust) estimates store extended estimates table baseline extended, b(%9.3f) se(%9.3f) stats(N r2)