MLE with normal mixture distribution

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

kusdhianto
Posts: 14
Joined: Thu Apr 22, 2010 2:40 am

MLE with normal mixture distribution

Postby kusdhianto » Thu Jun 16, 2011 7:48 pm

Dear All,
I tried to replicate estimation using ML method with normal mixture distribution as in Greene textbook (Econometric Analysis, 6th ed., p. 559).

I have created Logl object, and set up as follows:

Code: Select all

@logl logl res = gpa-c(1)-c(2)*grade-c(3)*psi-c(4)*tuce var1 = c(5) var2 = c(6) lambda = c(7) logl=log(lambda*(@dnorm(res/@sqrt(var1))-log(var1)/2)+(1-lambda)*(@dnorm(res/@sqrt(var2))-log(var1)/2))
when I ran the estimation, a message pops up: Error Message, Missing values in @LOGL series at current coefficients observation 1.

please tell me what's wrong and the solution to this problem. I also attached my work file. thank you.
Attachments
f16-1.wf1
(13.07 KiB) Downloaded 469 times

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: MLE with normal mixture distribution

Postby trubador » Fri Jun 17, 2011 1:07 am

This is one of the most frequent problems that EViews users encounter. The error message, on the other hand, is very explanatory. It basically says that it cannot generate the likelihood function for the first observation, and therefore cannot begin estimation. This may be caused by numerous reasons and you can find many examples on this issue if you search the forum. That said, I am pretty sure (without even looking at your workfile) that the starting values of coefficients cause the trouble in your case. Initializing the coefficient vector with proper values should solve your problem.

kusdhianto
Posts: 14
Joined: Thu Apr 22, 2010 2:40 am

Re: MLE with normal mixture distribution

Postby kusdhianto » Fri Jun 17, 2011 3:06 am

thank you for your reply,
can you suggest me, how to determine the appropriate initial value of the coefficients? should I enter the initial value in the coefficients series?

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: MLE with normal mixture distribution

Postby trubador » Fri Jun 17, 2011 6:59 am

Yes, you can enter initial values of parameters to the coefficient vector in the workfile (i.e. c). You can also use the param command.

kusdhianto
Posts: 14
Joined: Thu Apr 22, 2010 2:40 am

Re: MLE with normal mixture distribution

Postby kusdhianto » Fri Jun 17, 2011 8:49 am

thanks a lot, yes it works, now the pop up message is disappear.
but i realize that the likelihood function I quoted above is wrong, then i get another problem: how to state loglikehood function for normal mixture distribution in eviews?
my case is that:
Prob(class=1)=lambda
Prob(class=2)=1-lambda
both classes are normally distributed with var1 and var2 for variance of class 1 and class 2 respectively.
I tried this:
logl2=log(lambda*@dnorm(res1/@sqrt(var1))+(1-lambda)*@dnorm(res2/@sqrt(var2)))-(lambda*log(var1)/2)-((1-lambda)*log(var2)/2)
but it seems wrong as the results are not what I expected. please suggest me the correct one.

kusdhianto
Posts: 14
Joined: Thu Apr 22, 2010 2:40 am

Re: MLE with normal mixture distribution

Postby kusdhianto » Sun Jun 19, 2011 9:55 pm

any help please..


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 1 guest