I had a look at this SO question (and answer): http://stackoverflow.com/questions/41623583/error-0-non-na-cases-plm-package
There seems to be something special about the data and the model which leads to a non-estimable Swamy-Arora model (gretl's default RE estimator). Nerlove's estimator does not work either for gretl, but it works in R's plm package. So, this might be a bug in gretl?
summary(plm(Dependent ~ varA + varB + carC + varD, data=QuestionData,
Oneway (individual) effect Random Effect Model
(Nerlove's transformation)
Call:
plm(formula = Dependent ~ varA + varB + carC + varD, data = QuestionData,
model = "random", random.method = "nerlove", index = c("Name",
"Month"))
Balanced Panel: n=4, T=45, N=180
Effects:
var std.dev share
idiosyncratic 94880.6 308.0 0.18
individual 431873.1 657.2 0.82
theta: 0.9303
Residuals :
Min. 1st Qu. Median 3rd Qu. Max.
-1670.00 -142.00 -8.14 145.00 691.00
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
(Intercept) 366.065781488 353.574874540 1.0353 0.30194
varA 113.429096626 22.908823005 4.9513 0.000001725 ***
varB 0.000020127 0.000011626 1.7312 0.08519 .
carC -3.576421843 116.348935956 -0.0307 0.97551
varD -103.344113663 108.041774056 -0.9565 0.34013
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 20916000
Residual Sum of Squares: 16982000
R-Squared: 0.18809
Adj. R-Squared: 0.16953
F-statistic: 10.1352 on 4 and 175 DF, p-value: 0.00000021086
Am 31.03.2017 um 15:38 schrieb KTTK:
Hi, what do you mean with "Nerlove's estimator does not work either for
gretl"? Can you provide a concrete example?
Also (but with the caveat of not having thought too much about it right
now) the problem sounds as if it might affect Swamy-Arora and Nerlove in
a very similar way. If that is true, then the real question would be,
why does it work in R's plm?
thanks,
sven
The concrete example (and data) is given in the SO question.
The model is not estimable with the Swarmy-Arora option and that is correct, gretl gives an informative error message about it. I get the same error message with the Nerlove option with gretl. However, R's plm package gives estimates for the Nerlove option (and fails correctly for Swarmy-Arora, like gretl).
Not all RE estimators do the data transformation the same way, e.g. Wallac/Hussain and Amemiya (implemented in plm) do not seem to require the between models which is responsible for the non-estimability with Swarmy-Arora. I am just not sure whether the model should be estimable by Nerlove's method: gretl fails while R's plm package gives estimates.
On Sat, 1 Apr 2017, KTTK wrote:
Unlike Swamy-Arora, Nerlove's method does not require a constructive
estimate of the between variance (which is unobtainable in this
example since there are 5 parameters but only 4 individuals). So
perhaps we should produce estimates if the --nerlove option is
given, as plm does.
However, I'm not sure how reliable Nerlove-style estimates are in
such a case.
Am 01.04.2017 um 16:18 schrieb Allin Cottrell:
It sounds like it, yes.
I don't want to offer my speculation right now, but I think if the
specified method is capable in principle of producing results, then the
results should be given. We also return OLS results even if the
regressors are highly collinear. Of course, one may consider adding some
kind of warning message.
thanks,
sven
OK, we'll now provide random effects estimates when the --nerlove
option is given, in the case where the between variance cannot be
estimated directly (that is, Swamy-Arora fails).
I'm now closing this, but adding a footnote. If anyone wants to continue the
discussion, please use one of the gretl mailing lists. Here's the footnote: it
turns out that both Stata and current plm (1.6-5) are willing to produce
"Swamy-Arora" random-effects estimates for the dataset and model referenced
above. Their estimates differ: Stata sets the between variance to zero, so
theta = 0 and the "random effects" estimates are identical to pooled OLS;
plm somehow comes up with a non-zero between variance (I don't see how
this is possible using Swamy-Arora). In my opinion gretl is correct to decline
to provide Swamy-Arora estimates when the between model csnnot be
estimated, as it surely cannot in this case.