楼主: fengyuan78
3134 7

求做2道STATA题目 [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

已卖:2份资源

大专生

40%

还不是VIP/贵宾

-

威望
0
论坛币
250 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
1 点
经验
294 点
帖子
25
精华
0
在线时间
60 小时
注册时间
2009-6-21
最后登录
2013-7-31

楼主
fengyuan78 发表于 2011-3-2 16:50:18 |AI写论文
1000论坛币
use the http://www.stata-press.com/data/imeus/cigconsump dataset,

1. The cigconsump dataset contains 48 states’ annual data for 1985-1995. Fit an FE model of demand for cigarettes, packpc, as a function of price (avgprs) and per capita income (incpc). What are the expected signs? If not, how might you explain the estimated coefficients? can you reject the pooled OLS model of demand?

6. Store the estimates from the FE model, and refit the model with RE. How do these estimates compare? Does a Hausman test accept RE as the more appropriate estimator?


除了运行命令和结果,最好也加上一些对问题和运行结果的文字说明。凡是大概正确回答问题的答案,肯定给予1000论坛币奖励。

最佳答案

gdczlhd 查看完整内容

香烟价格上升则香烟需求量一般会下降 故价格的预期符号为负 收入增加对香烟需求量我觉得不确定 其符号为负为正都有可能 从FE(固定效应)估计模型来看 香烟价格和收入的增加都会降低香烟需求量 价格上涨需求量下降这个号理解 收入增加降低需求量可能是收入增加得同时提高了消费者的健康保护意识 所以倾向于降低吸烟的需求 F test that all u_i=0: F(47, 478) = 182.27 Prob > F = 0.0000 高度显著 因此拒绝了P ...
关键词:Stata tata coefficients appropriate coefficient 题目 Stata

沙发
gdczlhd 发表于 2011-3-2 16:50:19
香烟价格上升则香烟需求量一般会下降 故价格的预期符号为负 收入增加对香烟需求量我觉得不确定 其符号为负为正都有可能 从FE(固定效应)估计模型来看 香烟价格和收入的增加都会降低香烟需求量 价格上涨需求量下降这个号理解 收入增加降低需求量可能是收入增加得同时提高了消费者的健康保护意识 所以倾向于降低吸烟的需求 F test that all u_i=0:     F(47, 478) =   182.27             Prob > F = 0.0000
高度显著  因此拒绝了POLS回归  RE估计结果和FE很接近 Hausman检验无法拒绝原假设 因此用RE估计比FE估计更有效 这些解答lz满意不?
寻梦?撑一支长篙,向青草更青处漫溯;满载一船星辉,在星辉斑斓里放歌。

藤椅
gdczlhd 发表于 2011-3-2 17:13:30
. xtreg  packpc avgprs income,fe

Fixed-effects (within) regression               Number of obs      =       528
Group variable: stateid                         Number of groups   =        48

R-sq:  within  = 0.8405                         Obs per group: min =        11
       between = 0.1849                                        avg =      11.0
       overall = 0.3246                                        max =        11

                                                F(2,478)           =   1259.24
corr(u_i, Xb)  = 0.0303                         Prob > F           =    0.0000

------------------------------------------------------------------------------
      packpc |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      avgprs |  -.2956079   .0090834   -32.54   0.000    -.3134561   -.2777596
      income |  -4.87e-08   1.03e-08    -4.71   0.000    -6.90e-08   -2.84e-08
       _cons |   155.7055   1.000832   155.58   0.000     153.7389     157.672
-------------+----------------------------------------------------------------
     sigma_u |  18.702569
     sigma_e |  4.4923121
         rho |  .94545224   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(47, 478) =   182.27             Prob > F = 0.0000
寻梦?撑一支长篙,向青草更青处漫溯;满载一船星辉,在星辉斑斓里放歌。

板凳
gdczlhd 发表于 2011-3-2 17:15:26
Random-effects GLS regression                   Number of obs      =       528
Group variable: stateid                         Number of groups   =        48

R-sq:  within  = 0.8404                         Obs per group: min =        11
       between = 0.1955                                        avg =      11.0
       overall = 0.3310                                        max =        11

Random effects u_i ~ Gaussian                   Wald chi2(2)       =   2507.09
corr(u_i, X)       = 0 (assumed)                Prob > chi2        =    0.0000

------------------------------------------------------------------------------
      packpc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      avgprs |  -.2988638   .0087585   -34.12   0.000    -.3160302   -.2816975
      income |  -4.42e-08   9.47e-09    -4.66   0.000    -6.27e-08   -2.56e-08
       _cons |   155.7442   2.757327    56.48   0.000     150.3399    161.1484
-------------+----------------------------------------------------------------
     sigma_u |  17.709398
     sigma_e |  4.4923121
         rho |   .9395427   (fraction of variance due to u_i)
------------------------------------------------------------------------------
寻梦?撑一支长篙,向青草更青处漫溯;满载一船星辉,在星辉斑斓里放歌。

报纸
gdczlhd 发表于 2011-3-2 17:15:46
Note: the rank of the differenced variance matrix (1) does not equal the number of
        coefficients being tested (2); be sure this is what you expect, or there may be
        problems computing the test.  Examine the output of your estimators for anything
        unexpected and possibly consider scaling your variables so that the coefficients are
        on a similar scale.

                 ---- Coefficients ----
             |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
             |       fe           re         Difference          S.E.
-------------+----------------------------------------------------------------
      avgprs |   -.2956079    -.2988638         .003256        .0024074
      income |   -4.87e-08    -4.42e-08       -4.54e-09        4.14e-09
------------------------------------------------------------------------------
                           b = consistent under Ho and Ha; obtained from xtreg
            B = inconsistent under Ha, efficient under Ho; obtained from xtreg

    Test:  Ho:  difference in coefficients not systematic

                  chi2(1) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                          =        1.83
                Prob>chi2 =      0.1762
                (V_b-V_B is not positive definite)

.
寻梦?撑一支长篙,向青草更青处漫溯;满载一船星辉,在星辉斑斓里放歌。

地板
fengyuan78 发表于 2011-3-2 19:35:23
4# gdczlhd

很满意,就是不明白你第三页的输出结果是用什么命令得出的,你前两页我自己运行下面的两条命令可以得出,第三页你用的是什么命令?能完整给出命令吗,我自己运行下得出输出结果。

. xtreg  packpc avgprs income,fe

. xtreg  packpc avgprs income,re

7
fengyuan78 发表于 2011-3-2 20:26:04
看手册,明白了你应该用的是
. estimates store fixed
. hausman fixed ., sigmamore


已经给予1000论坛币奖励,请查收,以后也请多多帮忙!

8
gdczlhd 发表于 2011-3-2 21:12:51
这个例子中hausman检验程序为:
xtreg  packpc avgprs income,fe
est store fe
xtreg  packpc avgprs income/*默认就是re估计,加不加re都可以*/
est store re
hausman fe re
寻梦?撑一支长篙,向青草更青处漫溯;满载一船星辉,在星辉斑斓里放歌。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-4 04:40