Lema,

The short answer is not bother too much with Hausman tests.

(1) Re-parameterize your model as a multilevel model;
(2) Decompose your variables into 'fixed' (within) and 'random' (between) components;
(3) Run it in R (through gretl, if you wish), and then;
(4) Do a joint F test of the equality of coefficients.

In R, it would look something like this:

<R>
library(car,lme4) # assuming you have these packages installed in your R
attach(mydata) # R purists like to lecture you about not using -attach()-; for now, ignore them
m_x1=rep(tapply(x1,groupvar,mean),tapply(x1,groupvar,length))
d_x1=x1-m_x1
m_x2=rep(tapply(x2,groupvar,mean),tapply(x2,groupvar,length))
d_x2=x2-m_x2
fit1<-lmer(y~(1|groupvar)+(1|timevar),REML=T)
summary(fit1)
fit2<-lmer(y~d_x1+m_x1+d_x2+m_x2+(1|groupvar)+(1|timevar),REML=T)
summary(fit2)
anova(fit1,fit2)
linearHypothesis(fit2,c("d_x1=m_x1","d_x2=m_x2"))
</R>

(NB: -timevar- should be ordered by way of a time counter starting at 1 *within* each of your -groupvars-.)

If you have run the above routine successfully, it means that you have now tested for the equality (or not) of your fixed and random effects, thus obviating the need for any Hausman tests.

I hope that helps and good luck.

C

On 26 April 2018 at 03:05, 3jlema wrote:
Dear everyone,

I conducted a random effects panel model (90 observations, 15 cross-sectional units, 6 time-series length). The model has only one dichotomous predictor (coded 0 and 1). May i know why Hausman Test is not generated by Gretl?

The Breusch-Pagan test is significant (p<.001). I would appreciate any suggestion on the appropriate model for my data. That is, is it safe to use random effects or fixed effects? Again, why Hausman Test is not computed by gretl?

Thank you.
Lema

_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

--
Clive Nicholas

"My colleagues in the social sciences talk a great deal about methodology. I prefer to call it style." -- Freeman J. Dyson