1

当我在 stata 中使用 outreg 命令导出到一个文件,然后使用它导出到另一个文件,然后返回向原始文件添加更多内容时,该命令就像只有一个文件一样。正如您在下面的代码中看到的,我已经清楚地区分了这两个文件:

    (...regression...)
    outreg using fileA, landscape title(Farm Level by ///
    Stratum w/Management) starlevels(10 5 1) ///
    ctitles("Variables","Strat 1 Log Rev") replace
    (...do some other stuff, export new stuff to new file...)
    outreg using fileB,stats(b) landscape ///
    title("Normalized Ricardian Model w/Management Variables"\ ///
    "Farm Level by Stratum") noautosumm ///
    ctitles("Variables","Strat 1 Log Rev (%)") replace
    (...then another regression which I want to export to the original file...)
    outreg using fileA,landscape title(Farm Level by ///
    Stratum w/Management) starlevels(10 5 1) ///
    ctitles("Variables","Strat 1 Log Cost") merge replace
    (...But it simply merges everything together as though fileA and fileB were one)
4

2 回答 2

1

尝试

...
outreg ...  , merge(tblnameA)
...
outreg ...  , merge(tblnameB)

它包含在http://www.stata-journal.com/article.html?article=sg97_4

于 2012-04-25T12:38:06.067 回答
1

你可能想调查一下outreg2。它是用户贡献的,还允许您指定附加和替换选项。安装类型

findit outreg2
于 2012-05-17T14:20:54.017 回答