Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

panel data - Hausman test in R with maximum likelihood

I want to apply the Hausman test to decide whether to use fixed or random effects. I know that the process consists of: [1] estimating the fixed-effects model [2] then the random-effects one [3] then applying the test (e.g., phtest(femethod, remethod)

This works perfectly if the models are estimated with plm. The problem is the following: I am using pglm, since I need to estimate a negative binomial model with maximum likelihood. When I perform the test with my pglm estimates, I get the following message:

"Error in UseMethod("phtest") :no applicable method for 'phtest' applied to an object of class "c('maxLik', 'maxim', 'list')"

Thus, my question is: How can I perform the Hausman test with maximum likelihood estimates? Is there any way to do it? Otherwise, are there alternative ways to decide between fixed and random effects?

question from:https://stackoverflow.com/questions/65830435/hausman-test-in-r-with-maximum-likelihood

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...