## Questions related to panel analysis

Occasional Contributor
Posts: 5

# Questions related to panel analysis

Hello,

I  am working on a panel dataset. This is first time I use this method. I have a few questions and wonder if anyone from this community can help me.

Here are the steps I followed to conduct the analysis:

1. check if there is any autocorrelation
``````proc panel data=legalaid.panel;

id prov year;

model percapnum_of_app=percapcharge percapmale12_34 percappersonLIM percapexp /fuller parks rho;

run;``````

The results show that RHO values are greater than zero (from 0.56 to 0.95).  There is an auto-correlation. Therefore, I chose the "Parks" method.

2.Check if the panel is stationary by using the Hadri test:

``````proc panel data=legalaid.panel;

id prov year;

model percapnum_of_app=percapcharge percapmale12_17 percapmale18_34 percappersonLIM percapexp /parks stationarity=(Hadri);

run;``````

Please see  the test results below . I am not sure how to interpret the result. I checked with SAS User's Guide. It states "

Under the null hypothesis of stationary, the variance of the random walk equals 0". Since the P<0.05, therefore the null hypothesis can be rejected. Then the panel is not stationary. Can someone tell me that is this a correct interpretation?

If the panel is not stationary, can I use the Dasilva method?

Bandwidth Method      Andrews(91)

Deterministic Variables           IID Error          Hetero Error    Autocorr Error

Z          Pr > Z  Z          Pr > Z  Z          Pr > Z

CS Fixed                             10.79   <.0001 9.60     <.0001 4.61     <.0001

CS Fixed, Time                    5.16     <.0001 7.28     <.0001 8.35     <.0001

CS, TS Fixed                        11.16   <.0001 10.10   <.0001 4.75     <.0001

1. Check for cross sectional dependence by using CDTEST
``````proc panel data=legalaid.panel;
id prov year;
model percapnum_of_app=percapcharge percapmale12_17 percapmale18_34  percappersonLIM  percapexp /fuller parks
cdtest(p=1);
run;``````

Please see the test results below:

Panel Cross Sectional Dependence Tests

Dependent Variable: percapnum_of_app

Local Cross Sectional Dependence Test Results

p          CDp     Pr > |CDp|

1          0.15     0.8773

The null hypothesis: zero cross-sectional error correlations.

since P>0.05, so we can not reject null hypothesis. So there is no cross sectional dependence.

Is this a correct interpretation?

If there is cross-sectional error correlation, then how to fix the correlation?

SAS Employee
Posts: 7

## Re: Questions related to panel analysis

The Parks method might be a good choice but it really depends on diagnostics and assumptions behing your model. It is a good idea to test first if the errors are autocorrelated. The PANEL procedure offers several tests. Durbin-Watson BFN or Baltagi and Li's tests might be a good start. I would try to run several tests and figure out what type of correlation I have because it determines what type of model I might want to fit. If the errors are autocorrelated, the modeling possibilities range from differencing the data, Arellano and Bond's dynamic panel estimators or Park's method. The Park's model is typically used if you want to include a structure for contemporaneous correlation between cross sections with possible heteroscedasticity on top of autocorrelated errors.

If the panel is nonstationary you might want to difference the data. DaSilva is an MA type of estimator that doesn't help with this problem.

Hadri's test: Under the null data is stationary. Your test rejects the null and therefore the panel is nonstationary.

CD test: Under the null the residuals are not correlated. Your  p-value is pretty high indicating that the null cannot be rejected. There is no contemporaneous correlation between cross sections which somewhat suggests that the Parks model might not be needed.

Occasional Contributor
Posts: 5

## Re: Questions related to panel analysis

I did the Baltagi and Li (1991) (BL91) as you suggested in your response (please see the code blow).

proc panel data=legalaid.panel;
id prov year;
model percapnum_of_app=percapcharge percapmale12_17 percapmale18_34 percappersonLIM percapexp /fixone bl91 ;
model percapnum_of_app=percapcharge percapmale12_17 percapmale18_34 percappersonLIM percapexp /fixtwo bl91 ;

run;

The result shown blow. The null hypothesis is a white noise component: for MA with MA coefficient or for AR with AR coefficient. Does this mean I can use the Parks method and Dasilva option? However, this does not solve the problem of non-stationary of the panel. We can difference the data to resolve the non-stationary problem, but differencing method is for the fix models. Are there other methods I can use?

Baltagi and Li Joint Test for Random Cross Sectional Effects and AR-MA Serial Correlation

DF

m Value

Pr > m

2

389.51

<.0001

SAS Employee
Posts: 7

## Re: Questions related to panel analysis

Your test is rejecting the null which means that the errors are either serially correlated or/and the cross sectional effects are not independent. Parks method might not be needed but you might want to fit an AR/MA model. For discussion of these models see for example Baltagi, "Econometric Analysis of Panel Data". Unfurtunatelly, aside from dynamic panel estimator, Parks and Dasilva, the PANEL procedure doesn't accomodate these models. You might be able to fit some of them in the SSM procedure.

Occasional Contributor
Posts: 5