How to specify Maximum Likelihood

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

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

Re: How to specify Maximum Likelihood

Postby trubador » Tue May 19, 2009 11:39 pm

It seems you are having a convergence problem now. Your variance specification is too flexible. I am not sure if the scale() coefficient is really necessary. Anyway, you should keep trying different (and plausible) inital values.

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Tue May 19, 2009 11:54 pm

Dear Trubador, the results are coppied as follows. Please tell me what is the problem? And, I dont understand the initial value for beta (as shown in some example by Eviews):
LogL: UNTITLED
Method: Maximum Likelihood (Marquardt)
Date: 05/20/09 Time: 15:45
Sample: 1 441
Included observations: 441
Evaluation order: By observation
Convergence achieved after 4 iterations
WARNING: Singular covariance - coefficients are not unique

Coefficient Std. Error z-Statistic Prob.

BETA(1) 7.077052 NA NA NA
BETA(2) 0.113217 NA NA NA
BETA(3) -3.909232 NA NA NA
BETA(4) 0.026040 NA NA NA
BETA(5) 0.052618 NA NA NA
BETA(6) 2.781980 NA NA NA
SCALE(1) -0.524479 NA NA NA
ALPHA(1) 1.212937 NA NA NA

Log likelihood -952.1287 Akaike info criterion 4.354325
Avg. log likelihood -2.159022 Schwarz criterion 4.428503
Number of Coefs. 8 Hannan-Quinn criter. 4.383586

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

Re: How to specify Maximum Likelihood

Postby trubador » Wed May 20, 2009 12:02 am

Could you please post your workfile?

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Wed May 20, 2009 12:09 am

This file is as the one I 've shown in the last post.
Attachments
data for analysis.wf1
(46.21 KiB) Downloaded 421 times

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

Re: How to specify Maximum Likelihood

Postby trubador » Wed May 20, 2009 12:16 am

As I said before, you do not need the scale() coefficient. Just drop it and try again. You'll see that the model converges properly even if you assign 0 to other coefficients.

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Wed May 20, 2009 12:24 am

Oh, yes, it is. I would like to calculate DW stats, I tried that with the values in series "res" which I think is the residuals. Is that right? The DW stat I calculated is about 0.83. It is too low. Do you have any idea for this?

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Wed May 20, 2009 12:30 am

I have just tried to process MLM again from the beginning (in order to be sure all the initial values of beta, alpha are 0). but the interation stopped at "missing... at observation 97". Could you please exolain me more why this happen and in what principles?

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Wed May 20, 2009 12:45 am

So, it means MLM is not appropriate for solving this low serial correlation in my data. Do you suggest me any method? Might be, check the cointegration relations and using VECM is best. Do you think so?

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

Re: How to specify Maximum Likelihood

Postby trubador » Wed May 20, 2009 12:46 am

cuongnh wrote:Oh, yes, it is. I would like to calculate DW stats, I tried that with the values in series "res" which I think is the residuals. Is that right? The DW stat I calculated is about 0.83. It is too low. Do you have any idea for this?


That's because your residuals do have a serial correlation problem, which you can also confirm via correlogram. The problem is that your dependent and independent variables are not stationary. You should really revise your model before going any further.

cuongnh wrote:I have just tried to process MLM again from the beginning (in order to be sure all the initial values of beta, alpha are 0). but the interation stopped at "missing... at observation 97". Could you please exolain me more why this happen and in what principles?


Each time you run the model, it takes the stored values (from the previous estimation) as starting values. You can fix the values with param command inside logl object.

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

Re: How to specify Maximum Likelihood

Postby trubador » Wed May 20, 2009 12:52 am

cuongnh wrote:So, it means MLM is not appropriate for solving this low serial correlation in my data. Do you suggest me any method? Might be, check the cointegration relations and using VECM is best. Do you think so?


We had this discussion before and tcfoon gave you invaluable insights: http://forums.eviews.com/viewtopic.php?f=18&t=855&start=0&st=0&sk=t&sd=a

At this point, I really do not have much to do and strongly suggest you to spend more time with econometrics textbooks and EViews' user manual.

cuongnh
Posts: 70
Joined: Thu Dec 11, 2008 10:09 am
Contact:

Re: How to specify Maximum Likelihood

Postby cuongnh » Wed May 20, 2009 1:02 am

Thanks for your introduction of param command. I made it. I highly appreciate that you are with me!

thinhlien
Posts: 7
Joined: Thu Jun 11, 2009 4:04 am

Re: How to specify Maximum Likelihood

Postby thinhlien » Fri Jun 12, 2009 1:42 am

Dear kind Trubador,

Could you pls check your private message or have a quick look at topic 'Program mlogit'.

I would like to receive your help with the explanation of dd2, dd3.

Thanks alot,
thinhlien.

ouerk
Posts: 17
Joined: Tue May 23, 2017 11:29 am

Re: How to specify Maximum Likelihood

Postby ouerk » Sun Apr 22, 2018 9:38 am

Hey
when i estimate the LOGl, i have this error message: log of no positive number .

What can i do to solve this problem ?
thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: How to specify Maximum Likelihood

Postby EViews Gareth » Sun Apr 22, 2018 9:48 am

ouerk wrote:Hey
when i estimate the LOGl, i have this error message: log of no positive number .

What can i do to solve this problem ?
thanks

Don’t take the log of a non positive number.
Follow us on Twitter @IHSEViews

ouerk
Posts: 17
Joined: Tue May 23, 2017 11:29 am

Re: How to specify Maximum Likelihood

Postby ouerk » Sun Apr 22, 2018 10:32 am

i try with variable with positive value (in all the sample) and the log of this variable is positive too. ( i have indépendant variable y and x and z explicative variable)
i use this command in the logl after created the coefficient beta,scale and alpha:
@logl x z
@logl logl1
res = y - beta(1) - beta(2)*x - beta(3)*z
var = scale(1)*z^alpha(1)
logl1 = log(@dnorm(res/@sqrt(var))) - log(var)/2

when i estimate i have this message error: log of no positive number

when you tell me don t take negatif value , what do you mean?

if i remplace log(var)/2 by (var)/2 (i don t think it was the good transformation to do )==> i don t have message error but i obtain this estimation .How can i do to solve the problem ? thanks


LogL: UNTITLED
Method: Maximum Likelihood (BFGS / Marquardt steps)
Date: 04/22/18 Time: 19:22
Sample: 1 50
Included observations: 50
Evaluation order: By equation
Failure to improve likelihood (non-zero gradients) after 1 iteration
Coefficient covariance computed using outer product of gradients
WARNING: Singular covariance - coefficients are not unique

Coefficient Std. Error z-Statistic Prob.

BETA(1) 0.000000 NA NA NA
BETA(2) 0.000000 NA NA NA
BETA(3) 0.000000 NA NA NA
SCALE(1) 0.000000 NA NA NA
ALPHA(1) 0.000000 NA NA NA

Log likelihood 3224061. Akaike info criterion -128962.2
Avg. log likelihood 64481.22 Schwarz criterion -128962.0
Number of Coefs. 5 Hannan-Quinn criter. -128962.2


Return to “Estimation”

Who is online

Users browsing this forum: Baidu [Spider] and 28 guests