全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
13207 10
2009-05-29
比较模型设定时需要进行多个模型的回归!
回归以后,如何用一个表格显示多个模型的结果呢?
同时标注出显著性水平的参数?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2009-5-29 23:21:00

把模型标记为模型一、模型二等等,表格中第一行或第一列直接写模型一、模型二

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2009-5-29 23:23:00
以下是引用cathust在2009-5-29 23:09:00的发言:回归以后,如何用一个表格显示多个模型的结果呢?

*每作一步回归,使用

est sto a1

est sto a2

……

est sto an

*然后,使用

suest a1 a2 …… an

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2009-5-29 23:43:00

*每作一步回归,使用

est sto a1

est sto a2

……

est sto an

*然后,使用

est tab a1 a2 …… an, b(%6.3f) t(%6.3f) p(%4.3f)

[此贴子已经被作者于2009-5-30 11:44:15编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2009-5-30 09:35:00

是的有很多做法

上面sungmoo和voodoo的都可以。

我习惯用outreg命令。

STATA結果以Excel 或者WORD 輸出
https://bbs.pinggu.org/thread-435259-1-1.html

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2009-5-30 09:44:00

http://www.ats.ucla.edu/stat/stata/faq/outreg.htm

Stata FAQ
Can I make regression tables that look like those in journal articles?

This FAQ illustrates the outreg command that makes regression tables in a format that is commonly used in journal articles. The outreg command was written by John Luke Gallup and appears in the Stata Technical Bulletin #49. You can download outreg from within Stata by typing findit outreg (see How can I use the findit command to search for programs and get additional help? for more information about using findit).

Let's illustrate use of the outreg command using the high school and beyond data file we use in our Stata Classes.
use http://www.ats.ucla.edu/stat/stata/notes/hsb1, clear (highschool and beyond (200 cases))
We will run 3 regression models predicting the variable read.  The first model will predict from the variable write, the second model will predict from math and write, and the third model will predict from socst, math, and write. We will use outreg to create a single table that will summarize these models side by side.
regress read write Source | SS df MS Number of obs = 200 ---------+------------------------------ F( 1, 198) = 109.52 Model | 7450.28755 1 7450.28755 Prob > F = 0.0000 Residual | 13469.1324 198 68.0259215 R-squared = 0.3561 ---------+------------------------------ Adj R-squared = 0.3529 Total | 20919.42 199 105.122714 Root MSE = 8.2478 ------------------------------------------------------------------------------ read | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- write | .64553 .0616832 10.465 0.000 .5238896 .7671704 _cons | 18.16215 3.307162 5.492 0.000 11.64037 24.68394 ------------------------------------------------------------------------------
Here we use outreg to capture the results from the prior model, storing the output in the file test.doc and we suppress the variable labels and indicate we want to replace test.doc if it already existed.
outreg using test.doc, nolabel replace
Now we run our second regression model.
regress read math write Source | SS df MS Number of obs = 200 ---------+------------------------------ F( 2, 197) = 96.80 Model | 10368.63 2 5184.31501 Prob > F = 0.0000 Residual | 10550.79 197 53.5573096 R-squared = 0.4956 ---------+------------------------------ Adj R-squared = 0.4905 Total | 20919.42 199 105.122714 Root MSE = 7.3183 ------------------------------------------------------------------------------ read | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- math | .5196538 .0703972 7.382 0.000 .380825 .6584826 write | .3283984 .0695792 4.720 0.000 .1911828 .4656141 _cons | 7.541599 3.26819 2.308 0.022 1.096471 13.98673 ------------------------------------------------------------------------------
We run outreg again to capture the results of the second model, appending these results to the previous ones in test.doc.
outreg using test.doc, nolabel append
Now we run our third regression model.
regress read science socst math write  Source | SS df MS Number of obs = 195 ---------+------------------------------ F( 4, 190) = 65.23 Model | 11608.8938 4 2902.22346 Prob > F = 0.0000 Residual | 8453.08565 190 44.4899245 R-squared = 0.5787 ---------+------------------------------ Adj R-squared = 0.5698 Total | 20061.9795 194 103.412265 Root MSE = 6.6701 ------------------------------------------------------------------------------ read | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- science | .2657521 .0648044 4.101 0.000 .1379236 .3935806 socst | .2808959 .0581116 4.834 0.000 .1662691 .3955227 math | .2961578 .0743467 3.983 0.000 .1495068 .4428087 write | .1141745 .0724559 1.576 0.117 -.0287468 .2570959 _cons | 2.001966 3.163988 0.633 0.528 -4.239088 8.243021 ------------------------------------------------------------------------------
We run outreg again to capture the results of the third model.
outreg using test.doc, nolabel append
The contents of test.doc look like those below. Tabs are used between columns to get the columns to line up, so you will need to adjust your tab settings to get the tables to look as you desire.We have manually adjusted the spacing to show the columns properly.
 (1) (2) (3) read read read write 0.646 0.328 0.114 (10.47)** (4.72)** (1.58) math 0.520 0.296 (7.38)** (3.98)** science 0.266 (4.10)** socst 0.281 (4.83)** Constant 18.162 7.542 2.002 (5.49)** (2.31)* (0.63) Observations 200 200 195 R-squared 0.36 0.50 0.58 Absolute value of t-statistics in parentheses * significant at 5% level; ** significant at 1% level
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群