Dear all,
I'm new on Stata community and I'm using stata 12. I'm trying to determine whether governance has a direct effect on the economic growth of a panel of 33 countries over 15 years.
To make sure I can use panel fixed effect models I am trying to perform a homogeneity test on my dataset. My panel is balanced but with many missing values.
When I perform the Hsiao test (1986) it displays the error message "no observation r(2000)". I think it's because of the missing values. Am I right? Stata still displays a result can I take it into account ? If not, how to perform this test for a panel with missing data?
The Hsiao test command used :
* Calcul de SCR1 non contraint: Estimation équation par équation
set more off
local SCR1=0
scalar N=33
scalar T=15
scalar K=5
forvalues i=1/33 {
qui reg tc_pibh wgi_igg caphum ide com pop if i==`i'
local SCR1=`SCR1'+e(rss)
}
di `SCR1'
* Calcul de SCR1C contraint: Estimation sur le modèle empilé
qui reg tc_pibh wgi_igg caphum ide com pop
local SCR1C=e(rss)
di `SCR1C'
*Calcul de la statistique de Fisher F1 N=33 T=15 K=5
local F1=((`SCR1C'-`SCR1')*(N*T-N*(K+1)))/(`SCR1'*(N-1)*(K+1))
*La P_value de F1
di "dof1 = " (N-1)*(K+1) " dof2 = " (N*T-N*(K+1))
local PVF1=Ftail((K+1)*(N-1),(N*T-N*(K+1)),`F1')
* Calcul de SCR1CP: estimation du modèle à effets individuels
xtreg tc_pibh wgi_igg caphum ide com pop laid,fe
local SCR1CP=e(rss)
di `SCR1CP'
*Calcul de la statistique de Fisher F2
local F2=((`SCR1CP'-`SCR1')*(N*T-N*(K+1)))/(`SCR1'*(N-1)*K)
*La P_value de F2
di "dof1 = " K*(N-1) " dof2 = " (N*T-N*(K+1))
local PVF2=Ftail(K*(N-1),(N*T-N*(K+1)),`F2')
*Calcul de la statistique de Fisher F3
local F3=(`SCR1C'-`SCR1CP')*(N*(T-1)-K)/(`SCR1CP'*(N-1))
*La P_value de F3
di "dof1 = " (N-1) " dof2 = " (N*(T-1)-K)
local PVF3=Ftail((N-1),(N*(T-1)-K),`F3')
*Affichage des résultats
di in y " SCR1 = " in gr `SCR1'
di in y " SCR1C = " in gr `SCR1C'
di in y " SCR1CP = " in gr `SCR1CP'
di in y "F1 = " in gr `F1'
di in y "F2 = " in gr `F2'
di in y "F3 = " in gr `F3'
di in y "PvalF1 = " in gr `PVF1'
di in y "PvalF2 = " in gr `PVF2'
di in y "PvalF3 = " in gr `PVF3'
In attachments you will find xtdescribe, xtsum and the error message.
Thank you very much for your help,
Kindy
Related Posts with Homogeneity test (Hsiao test) on panel data balanced with many missing values
Recode returns incorrect codeI am try to execute the following code Code: recode educn (1=0)(2/4=1)(5=3)(6=5)(12=15)(10=12)(8=1…
Tempfile invalid file specification[previous code] foreach q in ca cb cc cd ce { preserve gen var = "`q'" tempfile ``q'' save ``q'', r…
Dropping duplicated time vars conditional to changes of other variablesHello, I'm trying to get make this into a panel, but I can't since it duplicated time observations …
Unable to refer to sreturned varlist outside of programI wrote an sclass program which returns two variable lists in separate macros: Code: capture prog…
repeating random sample and averaging the resultsHi all, I'm trying to do an analysis of covariance (ANCOVA) for a sample of all non-financial firms…
Subscribe to:
Post Comments (Atom)
0 Response to Homogeneity test (Hsiao test) on panel data balanced with many missing values
Post a Comment