Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Robust Hausman Test with xtlogit command


From   <[email protected]>
To   <[email protected]>
Subject   st: Robust Hausman Test with xtlogit command
Date   Fri, 25 Jun 2010 17:38:26 +1100

Hello,

I trying to perform a robust Hausman test in order to test the hypothesis of FE vs RE logit model, with two different methods without success : suest command and program suggested by Wooldridge (2002). Being a non specialist of econometric techniques, I'm afraid the errors have to do with the program.

I'm working on the economic determinants of conflict onset and duration in 10 African countries, therefore estimating with panel data, and performing tests on Stata 10.1. Below is my do file :

**Panel logit test on conflict onset/duration in African countries
log using Conflit, replace
set memory 18m
use ConflitAfrique
tsset pays temps, yearly
gen conflit1 = L.conflit
gen txaide = aide/pib
gen txaide3 = log(0.2*(L.txaide+L2.txaide+L3.txaide))
gen lpibt = log(pib/pop)
gen txpib = (pib-L.pib)/L.pib
gen croiss = L.txpib
gen txdette = dette/pib
gen txide = ide/pib
gen lpop = log(L.pop)
gen txaliment = (aliment-L.aliment)/L.aliment
gen txpop = (pop-L.pop)/L.pop
gen alimentpop = L.txaliment/L.txpop
gen leau = log(eau)
gen pibus3 = log(0.2*(L.pibus+L2.pibus+L3.pibus))
gen pibfr3 = log(0.2*(L.pibfr+L2.pibfr+L3.pibfr))

**Test de specification de Hausman
**Model1 : conflict continuation
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==1, fe
estimates store FE
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==1, re
estimates store RE
hausman FE RE
**Model2 : conflict onset
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==0, fe
estimates store FE
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==0, re
estimates store RE
hausman FE RE

*** Robust Hausman test according to the methodology of Wooldridge(2002)
**Model1 : conflict continuation
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==1, re
scalar theta = e(theta)
foreach x of txaide lpibt croiss service g txide lpop alimentpop eau {
by pays: egen mean`x' = mean(`x')
generate md`x' = `x' - mean`x'
generate red`x' = `x' - theta*mean`x'
}

///RESULTS : invalid syntax r(198);

quietly regress redtxaide redlpibt redcroiss redservice redg redtxide redlpop redalimentpop redeau mdtxaide mdlpibt mdcroiss mdservice mdg mdtxide mdlpop mdalimentpop mdeau , cluster(pays) test mdtxaide=mdlpibt=mdcroiss=mdservice=mdg=mdtxide=mdlpop=mdalimentpop=mdeau=0

** Generalisation of Hausman Test with suest
**Model1 : conflict continuation
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==1, fe
estimates store FE
quietly xtlogit conflit txaide lpibt croiss service g txide lpop alimentpop eau if conflit1==1, re
estimates store RE
suest FE RE

///RESULTS : unable to generate scores for model RE, suest requires that predict allow the score option r(322);

testnl [FE].=[RE].


Thank you very much in advance for your help.

Best Regards
Severine

****

Dr Severine BLAISE
Senior Lecturer in economics
University of New-Caledonia
Department of Law-Economics-Business
B.P. R4
98 851 Noumea CEDEX
New Caledonia

Web : http://www.severine-blaise.com/
Téléphone : (687) 26 69 31    Fax : (687) 26 69 30

« Think green : print this message only if necessary »


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index