Page 1 of 1

Structure Panel Data Set

Posted: Fri Aug 07, 2009 5:09 pm
by Nadiarock1
Hi,

I work with panel data for agricultural support.
OECD countries (12) for "i". In
1986-2008: for "T"
3 endogeneous: y1, y2, CPI:
2 exo: API, dummy.

Following Hsiao(1986) there are assumptions before using a panel data set (UG 548) with the model Yit= Ait + Bit+eit

1- For individual (i) all coefficients are assumed to be constants (pooled panel). i.e Ho: A,B=Ai,Bi
If Ho is not true, then there is heterogeneity. The next step is to test if this heterogeneity comes from the coefficients(Bit)..

2-Heterogeneity of estimators: Ho: Ai,B=Ai,Bi. If Ho is rejected, panel data must not be used because only intercept might be similiar for all countries. Country by country must be regress instead of using panel data.

3. If Ho cannot be rejected, the next step is to test if Ho: A,B=Ai,B for all countries. If it is rejected, I have to test if the individual fixed or random effects.

4. I have to use Hausman test to know if there is fixed of random individual effects.

Above, it is my way to resolve the tests. I hope I was clear.
My problem is: How can I do this with RATS?? I am completely confused with the options I have on the Panel Regression Wizard. I switch to RATS programming because, with Stata, I was not able to run a VAR Panel.

In the Panel Regression Wizard, I keep the Effects: Individual.
For #1: I don't know
For #2: I think I have to use the Method: Between
For #3 #4 I don't know
Do I have to use pregress of pstats?

Thank you very much if somebody can help me!!

Nadia

Re: Structure Panel Data Set

Posted: Sun Aug 09, 2009 8:33 am
by TomDoan
Nadiarock1 wrote:Hi,

I work with panel data for agricultural support.
OECD countries (12) for "i". In
1986-2008: for "T"
3 endogeneous: y1, y2, CPI:
2 exo: API, dummy.

Following Hsiao(1986) there are assumptions before using a panel data set (UG 548) with the model Yit= Ait + Bit+eit

1- For individual (i) all coefficients are assumed to be constants (pooled panel). i.e Ho: A,B=Ai,Bi
If Ho is not true, then there is heterogeneity. The next step is to test if this heterogeneity comes from the coefficients(Bit)..

2-Heterogeneity of estimators: Ho: Ai,B=Ai,Bi. If Ho is rejected, panel data must not be used because only intercept might be similiar for all countries. Country by country must be regress instead of using panel data.

3. If Ho cannot be rejected, the next step is to test if Ho: A,B=Ai,B for all countries. If it is rejected, I have to test if the individual fixed or random effects.

4. I have to use Hausman test to know if there is fixed of random individual effects.

Above, it is my way to resolve the tests. I hope I was clear.
My problem is: How can I do this with RATS?? I am completely confused with the options I have on the Panel Regression Wizard. I switch to RATS programming because, with Stata, I was not able to run a VAR Panel.

In the Panel Regression Wizard, I keep the Effects: Individual.
For #1: I don't know
For #2: I think I have to use the Method: Between
For #3 #4 I don't know
Do I have to use pregress of pstats?

Thank you very much if somebody can help me!!

Nadia
This is an example from Baltagi's panel data book which tests for several forms of pooling. The fully pooled regression is done with just a LINREG. The fully separated regression is most easily done with the SWEEP instruction. Note that METHOD=BETWEEN is rarely used for anything other than demonstration purposes.

Code: Select all

*
* Example 4.1.3, example 1 from pp 61-62
*
open data grunfeld.xls
calendar(panelobs=20,a) 1935
all 10//1954:01
data(format=xls,org=columns) 1//1935:01 10//1954:01 firm year invest value cap
*
* Chow pooling tests on individuals
*
* Compute fully pooled regression (linreg)
*
linreg(define=eqn) invest
# constant value cap
compute rsspool=%rss,ndfpool=%ndf
*
* Compute fully separated regression
*
sweep(group=%indiv(t))
# invest
# constant value cap
compute rssfull=%sigma(1,1)*%nobs,ndffull=%nobs-%nregsystem
*
* Compare fully pooled with fully separated
*
compute fstat=((rsspool-rssfull)/(ndfpool-ndffull))/(rssfull/ndffull)
cdf(title="Chow Test for Pooling") ftest fstat ndfpool-ndffull ndffull
*
* Compute regression pooled on slopes only (FE)
*
preg(equation=eqn,method=fixed)
compute rssfe=%rss,ndffe=%ndf
*
* Compare FE with fully separated
*
compute fstat=((rssfe-rssfull)/(ndffe-ndffull))/(rssfull/ndffull)
cdf(title="Chow Test for Pooling, Slopes Only") ftest fstat ndffe-ndffull ndffull
*
* Chow pooling test, time
*
sweep(group=%period(t))
# invest
# constant value cap
compute rssfullt=%sigma(1,1)*%nobs,ndffullt=%nobs-%nregsystem
compute fstat=((rsspool-rssfullt)/(ndfpool-ndffullt))/(rssfullt/ndffullt)
cdf(title="Chow Test for Pooling, Time") ftest fstat ndfpool-ndffullt ndffullt