NOTE: I am using Stata for doing this.
I have a long panel dataset, meaning my N is much smaller than my T. I have N = 5, T = 61. I tried to estimate my model, but I get an error related to the fact that I do not have enough degrees of freedom for calculating as many variables as I have.
This is what I get:
Wald chi2(4) = . Prob > chi2 = .
Stata's help tells me the following:
The VCE you have just estimated is not of sufficient rank to perform the model test. As discussed in [R] test, the model test with clustered or survey data is distributed as
F(k,d-k+1) or chi2(k), where k is the number of constraints and d=number of clusters or d=number of PSUs minus the number of strata. Because the rank of the VCE is at most d and the model test reserves 1 degree of freedom for the constant, at most d-1 constraints can be tested, so k must be less than d. The model that you just fit does not meet this requirement.
To simplify the remaining discussion, let's consider the case of clustered data. This discussion applies to survey estimation in general by substituting, "PSUs - strata" for "clusters".
There is no mechanical problem with your model, but you need to consider carefully whether any of the reported standard errors mean anything. The theory that justifies the standard error calculation is asymptotic in the number of clusters, and we have just established that you are estimating at least as many parameters as you have clusters.
That concern aside, the model test statistic issue is that you cannot simultaneously test that all coefficients are zero because there is not enough information. You could test a subset, but not all, and so Stata refuses to report the overall model test statistic.
Here note the degrees of freedom reported for the chi2 or F. You might see chi2(6) or F(6, 5). If you were to count the number of coefficients that would be constrained to 0 in a model test in this case, you would find that number to be greater than 6. You could find out what that number is by re-estimating the model parameters without the
vce(cluster clustvar)options. In any case, the 6 reported is the maximum number of coefficients that could be simultaneously tested.
Reading the book "Microeconometrics using Stata", the author clearly indicates that the
xtreg command, with the
vce(cluster id) option for calculating robust errors, is mostly appropriate for short panels.
An alternative is to use the command
xtregar for estimating random and fixed effects, which is based on an AR(1) process for the errors. However, we have tested, and our errors do not show an AR(1) pattern (
xtserial test). The
xtregar command has the option
rhof(#), where # indicates the desired rho value (AR(rho)).
So the questions are two:
1) What is the right way to calculate Fixed and Random Effects for a long panel?
2) Would specifying rho = 0 completely eliminate the AR(1) process for the errors, and leave us with an estimation that fits our data?