On Fri, 12 Jul 2019, Sven Schreiber wrote:
for testing purposes I stumbled over the question of gretl's ways
of
running a fixed effects (FE) panel regression when the dependent
variable is not time-varying. Example:
<hansl>
open abdata
panel IND const INDOUTPT # FE per default
</hansl>
I would have thought that gretl either refuses to execute this, or
perhaps would drop the fixed effects, or something. But it reports some
-arguably strange- output wihtout explicit indication of a problem. (Is
this perhaps due to the panel being unbalanced?)
Neither stata nor R reject this specification, but the "arguably
strange" output from gretl is indeed an artifact of sub-par numerical
precision in the unbalanced case using Cholesky decomposition. I've
switched to QR for this task and we now show something similar to
stata:
Model 1: Fixed-effects, using 1031 observations
Included 140 cross-sectional units
Time-series length: minimum 7, maximum 9
Dependent variable: IND
coefficient std. error t-ratio p-value
-------------------------------------------------------
const 5.12318 0.00000 NA NA
INDOUTPT 0.00000 0.00000 NA NA
Mean dependent var 5.123181 S.D. dependent var 2.678095
For anyone who wants to run the comparison:
<hansl>
open abdata
panel IND const INDOUTPT
genr time
series unit = $unit
list L = IND INDOUTPT time unit
foreign language=stata --send-data=L
xtset unit time
xtreg ind indoutpt, fe
end foreign
foreign language=R --send-data=L
library(plm)
A <- pdata.frame(gretldata, index = c("unit", "time"))
m <- plm(IND ~ INDOUTPT, data=A, model="within")
summary(m)
end foreign
</hansl>
Allin