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
Displaying number of observations after "Repest" commandI use the user written command "Repest" to analyse PISA survey data. I then use eststo and esttab to…
line of fit for two skewed continuous variablesI am conducting Spearman's correlation on two skewed continuous variables. I do not wish to log tran…
State-level time series: tool for calculating requisite number of observations per state/year?Greetings, I'm running Stata 15.1 on OSX. My ultimate goal is to examine whether changes in a speci…
Area Under Curve (AUC) after random Effects modelsI would like to know how can I calculate AUC after I run a logit model using runmlwin command throug…
Difference in Differences with unbalanced (asymmetric) time periodsHello list, I am troubled by a problem I face in my thesis: In a difference-in-differences approach…
Subscribe to:
Post Comments (Atom)
0 Response to Homogeneity test (Hsiao test) on panel data balanced with many missing values
Post a Comment