如何保存stata的结果
来源:百度文库 编辑:神马文学网 时间:2024/04/29 21:24:48
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.
Let's illustrate use of the outreg command using the high school and beyond data file we use in our Stata Classes.
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.use http://www.ats.ucla.edu/stat/stata/notes/hsb1, clear(highschool and beyond (200 cases))
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.regress read writeSource | SS df MS Number of obs = 200---------+------------------------------ F( 1, 198) = 109.52Model | 7450.28755 1 7450.28755 Prob > F = 0.0000Residual | 13469.1324 198 68.0259215 R-squared = 0.3561---------+------------------------------ Adj R-squared = 0.3529Total | 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------------------------------------------------------------------------------
Now we run our second regression model.outreg using test.doc, nolabel replace
We run outreg again to capture the results of the second model, appending these results to the previous ones in test.doc.regress read math writeSource | SS df MS Number of obs = 200---------+------------------------------ F( 2, 197) = 96.80Model | 10368.63 2 5184.31501 Prob > F = 0.0000Residual | 10550.79 197 53.5573096 R-squared = 0.4956---------+------------------------------ Adj R-squared = 0.4905Total | 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 .6584826write | .3283984 .0695792 4.720 0.000 .1911828 .4656141_cons | 7.541599 3.26819 2.308 0.022 1.096471 13.98673------------------------------------------------------------------------------
Now we run our third regression model.outreg using test.doc, nolabel append
We run outreg again to capture the results of the third model.regress read science socst math write Source | SS df MS Number of obs = 195---------+------------------------------ F( 4, 190) = 65.23Model | 11608.8938 4 2902.22346 Prob > F = 0.0000Residual | 8453.08565 190 44.4899245 R-squared = 0.5787---------+------------------------------ Adj R-squared = 0.5698Total | 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 .3935806socst | .2808959 .0581116 4.834 0.000 .1662691 .3955227math | .2961578 .0743467 3.983 0.000 .1495068 .4428087write | .1141745 .0724559 1.576 0.117 -.0287468 .2570959_cons | 2.001966 3.163988 0.633 0.528 -4.239088 8.243021------------------------------------------------------------------------------
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.outreg using test.doc, nolabel append
(1) (2) (3)read read readwrite 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 195R-squared 0.36 0.50 0.58Absolute value of t-statistics in parentheses* significant at 5% level; ** significant at 1% level
如何保存stata的结果
stata的权重
如何保存网页上的文章
没喝完的美酒如何保存
如何看血脂化验单的结果?
如何正确保存您的DVD光盘?
如何看检测肾功能的化验结果
如何保存不能直接下载的视频
Stata Web Books: Regression with Stata
如何下载保存动画
如何下载保存Flash
如何保存在线视频文件
如何保存在线视频文件
如何保存Flash
如何保存在线视频文件
如何保存古钱币
四问张延生 结果会如何?
相配结果如何?
如何保存 视频文件
stata 第一天
功勋累累的刘伯承元帅如何蒙冤?(董保存)
眼球SEO:如何实现GOOGLE搜索结果的链接列表
如何下载保存动画 - 壹茳舂渁的日志 - 网易博客
包饺子 如何保存蔬菜馅的完整营养