Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Hausman test


From   "hanaa mounjib" <[email protected]>
To   [email protected]
Subject   st: Hausman test
Date   Thu, 23 Dec 2004 13:42:43 -0500 (EST)

Hi

I�used�Hausman�test�to�choose�between�a�fixed�effects�and�random�effects�but�i�am�very�surprised�by�results:

 ��First�,�the�value�if�the�chi2�is�too�big�and�its�sign�depends�on�the�order�of�commands�user�in�stata

1)��if�i�started�with�random�commands�in�stata�are:
 ��xtreg�y�x,�random
   ��estimates�store�random
   ��xtreg�y�x,�fixed
   ��hausman�random

             �----�Coefficients�----
            �|     �(b)         �(B)           �(b-B)    �sqrt(diag(V_b-V_B))
            �|    �random        �.         �Difference         �S.E.
-------------+----------------------------------------------------------------
     �rating�|   �.0142675    �.0096562       �.0046113              �.
   �varautor�|  �-.0005397   �-.0002915      �-.0002482       �.0001096
        �def�|   �.1071089    �.0880998       �.0190091              �.
        �csr�|    �.037553    �.0331016       �.0044514              �.
        �anc�|  �-.0007706   �-.0007352      �-.0000354              �.
         �tx�|   �.0038553    �.0060001      �-.0021448              �.
     �spread�|   �.0083779   �-.0217386       �.0301165              �.
        �ech�|   �.0004364     �.000571      �-.0001346              �.
    �varpibg�|   �.0260169    �.0341001      �-.0080832       �.0074378
         �f1�|   �.1289178    �.0356372       �.0932806              �.
         �f2�|   �.0457407    �.0389245       �.0068162       �.0002615
         �f3�|   �.0374901     �.033304       �.0041861       �.0003952
         �f4�|   �-.017298   �-.0144426      �-.0028554              �.
---------------------------------------------------------------------------
         �
 �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(13)�=�(b-B)'[(V_b-V_B)^(-1)](b-B)
  �=�-1383.63   �chi2<0�==>�model�fitted�on�these
    �
�data�fails�to�meet�the�asymptotic
     �assumptions�of�the�Hausman�test;
     �see�suest�for�a�generalized�test







�2-If�i�start�with�fixed�commands�in�stata�are�:
     ��xtreg�y�x,�fixed
     ��estimates�store�fixed
    ��xtreg�y�x,�random
     ��hausman�fixed�
�
                �----�Coefficients�----
            �|     �(b)         �(B)           �(b-B)    �sqrt(diag(V_b-V_B))
            �|    �fixed         �.         �Difference         �S.E.
-------------+----------------------------------------------------------------
     �rating�|   �.0096562    �.0142675      �-.0046113        �.000271
   �varautor�|  �-.0002915   �-.0005397       �.0002482              �.
        �def�|   �.0880998    �.1071089      �-.0190091       �.0069914
        �csr�|   �.0331016     �.037553      �-.0044514       �.0003885
        �anc�|  �-.0007352   �-.0007706       �.0000354       �.0000515
         �tx�|   �.0060001    �.0038553       �.0021448       �.0002077
     �spread�|  �-.0217386    �.0083779      �-.0301165       �.0014616
        �ech�|    �.000571    �.0004364       �.0001346       �.0000186
    �varpibg�|   �.0341001    �.0260169       �.0080832              �.
         �f1�|   �.0356372    �.1289178      �-.0932806       �.0042425
         �f2�|   �.0389245    �.0457407      �-.0068162              �.
         �f3�|    �.033304    �.0374901      �-.0041861              �.
         �f4�|  �-.0144426    �-.017298       �.0028554       �.0010139
----------------------------------------------------------------------------
      ��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(13)�=�(b-B)'[(V_b-V_B)^(-1)](b-B)
                        ��=   ��1383.63
              ��Prob>chi2�=    ��0.0000
              ��(V_b-V_B�is�not�positive�definite)



Second�i�got�the�remark�V_b-V_B�is�not�positive�definite�,�i�don't�know�what�does�it�mean�neither�how�to�deal�with�this�problem�


third�,�when�comparing�the�fixed�estimates�with��random�estimates�i�didn't�see�a�big�differences�in�value�except�for�the�variable�spread�which�sign�has�changed�.
�
I�would�be�very�greatful�if�someone�help�me�in�resolving�those�problems.�I�ve�alredy�tried�the�commnd�suest�but�xtreg�didn't�accept�to�undertake�the�option�score()�which�is�necessary.

Best�whises�

Hanaa



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index