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))
please tell me what's wrong and the solution to this problem. I also attached my work file. thank you.
