網路城邦

上一篇 回創作列表 下一篇   字體:
如何用STATA檢驗不同樣本群迴歸模式的係數差異
2010/06/07 17:53:38瀏覽11259|回應0|推薦2
  最近阿昇的論文裏面需要比較高多角化的廠商以及低多角化的廠商的統計迴歸式裏面的係數有無顯著差異,他顯然就卡在這裡找不到解決方法。

其實STATA裏面解決這樣的方法很多。最常見的方法就是CHOW TEST。CHOW test還是一個出身我國的知名的華人教授鄒至莊所訂下的檢定方法。1993年美国密西根大学“经济学俱乐部”评选的“29位伟大的经济学家”,他是唯一上榜的华裔学者,排名第8。

CHOW Test的好處在於可以驗證不同群體的參數,例如斜率與截距有無顯著差異。還可以在時間序列迴歸裏面驗證不同時間間隔是否出現結構性的變化。

If you are interested only in difference of intercepts, try a dummy variable regression model (fixed effect model).

Suppose you suspect that the impact of salary on employees' motivation varies across companies; the slope of salary of one company is different from the slopes of other companies. For the sake of convenience, consider only two companies (d=1 or 0) here. size and culture are covariates.

The pooled model, which assumes both companies have the same slopes and intercept, is:
. regress motivation salary size culture

You may fit separate regressions as follows:
. regress motivation salary size culture if d==1 // for company 1
. regress motivation salary size culture if d==0 // for company 2

For the Chow Test, create an interaction term of the regressor salary and the dummy variable d, and then fit the model with the interaction and the dummy as follows:
. gen salary_d = salary * d
. regress motivation salary salary_d d size culture

The coefficient of d is the deviation of the second company's intercept from the baseline intercept (d=0). Likewise, the coefficient of salary is the slope of the baseline company, and the coefficient of salary_d is the deviation of the comparison group's slope from the baseline slope.

Now, conduct the Chow Test using the .test command. The null hypothesis is that two companies have equal parameters for salary and intercept; deviations of the slope and intercept are not statistically discernible from zero.
. test _b[salary_d]=0, notest
. test _b[d]=0, accum

The notest option suppresses the output and accum tests a hypothesis jointly with a previously tested one. Rejection of the null hypothesis means that two companies do not share the same intercept and slope of salary.

For more details about the Chow Test, see Stata's Chow tests
FAQ
.

除了CHOW Test 之外,其實STATA也還有幾個簡單的方法可以利用。

xtreg Y1 X1 X2 if group==1

est store eqn1

在迴歸式之後將係數
儲存於EQN1

xtreg Y2 X1 X2 if group2==1

est store eqn2
在迴歸式之後將係數儲存於EQN2


再藉著SUEST來建立前面兩個迴歸式參數的共變異矩陣,結果如下:

. suest eqn1 eqn2

Simultaneous results for eqn1, eqn2

                                                  Number of obs   =         74

------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
eqn1_mean    |
       trunk |   1.795019   .5414509     3.32   0.001     .7337943    2.856243
      weight |   .0198257   .0026465     7.49   0.000     .0146386    .0250128
       _cons |    101.191   7.976745    12.69   0.000     85.55684    116.8251
-------------+----------------------------------------------------------------
eqn1_lnvar   |
       _cons |    4.07378   .1992297    20.45   0.000     3.683297    4.464263
-------------+----------------------------------------------------------------
eqn2_mean    |
       trunk |   .3505976   .2067864     1.70   0.090    -.0546962    .7558915
      weight |   .0281942   .0013789    20.45   0.000     .0254916    .0308968
       _cons |    99.5758   2.856284    34.86   0.000     93.97758     105.174
-------------+----------------------------------------------------------------
eqn2_lnvar   |
       _cons |   3.192463   .1816868    17.57   0.000     2.836364    3.548563
------------------------------------------------------------------------------


接著就比較在模式一與模式二中的trunk變數的係數的平均
值有無顯著差異。Null Hypothesis是假定兩者相減為0.

. test [eqn1_mean=eqn2_mean]: trunk

 ( 1)  [eqn1_mean]trunk - [eqn2_mean]trunk = 0

           chi2(  1) =    6.21
         Prob > chi2 =    0.0127

有顯著差異,所以推翻虛無假設。兩者不相等。
這樣就可以完工走人!

compare coefficients from two models, stata, chow test, pool regression, interaction effect, structure break
( 時事評論財經 )

回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=panwh&aid=4105910