You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Stata使用esttab输出组间均值比较表时mtitles参数失效问题

错误原因
  • mtitles 是用于为多个独立存储的估计结果(通过est store保存的多组模型)设置列标题的参数,本次仅生成了1组ttest的估计结果,因此mtitles仅会识别第一个标题参数,剩余标题无法生效。
  • 你通过cell("mu_1 mu_2 p")指定在同一组估计结果下输出三个统计量列,这类统计量列的标题需要通过collabels参数设置,而非mtitles。你原来的代码设置了collabels(none),也直接导致后两列自定义标题不显示。
修正方案

删除mtitles参数,将你需要的三个列名填入collabels即可,修正后代码如下:

estpost ttest cigsale lnincome beer age15to24 retprice, by(California)
esttab using ta.rtf, cell("mu_1 mu_2 p") label ///
title(Mean characteristics of California and 38 control states) ///
collabels("California" "Average of 38 control states" "P value") unstack noobs nonumber ///
addnote("All variables are averaged from 1980 to 1988. Beer consumption is averaged from 1984 to 1988. GDP per capita is measured in 1997 dollars, retail prices are measured in cents, beer consumption is measured in gallons, and cigarette sales are measured in packs")

内容的提问来源于stack exchange,提问作者user17064127

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.29 16:45:04