Page 1 of 1
Likelihood ratio test
Posted: Fri Jul 20, 2012 8:24 am
by kenlopes
I'm trying to do the likelihood ratio test between two linear models. What command should I use. I used the command, but did not yield any result.
the command:
scalar lr = -2*(modelolinear2.@logl - modelolinear1.@logl)
scalar q =1
scalar lr_pval = 1 - @cchisq(lr,q)
Re: Likelihood ratio test
Posted: Fri Jul 20, 2012 9:05 am
by EViews Gareth
Could you be more specific? What do you mean "did not yield any result"? Were the scalars created?
Re: Likelihood ratio test
Posted: Sun Sep 02, 2012 6:57 pm
by beniam
Could you be more specific? What do you mean "did not yield any result"? Were the scalars created?
Gareth, I saw this post only after I posted mine in a different string. I thought I may post here as well in case other users face similar issues in the future. In my case, E-views sends an error message saying "LR is not defined". What could possibly be the reason?
Kindly,
Ben
Re: Likelihood ratio test
Posted: Sun Sep 02, 2012 8:30 pm
by EViews Gareth
Probably means you're referencing something called LR, which doesn't exist.
Re: Likelihood ratio test
Posted: Sun Sep 02, 2012 11:46 pm
by startz
Check to see whether the scalar lr was created after the line
Code: Select all
scalar lr = -2*(modelolinear2.@logl - modelolinear1.@logl)
The last command should work.