[Gretl-users] maximum like. conditions

Davor Horvatic davorh at phy.hr
Sun Nov 29 08:02:12 EST 2009


OK, I can confirm this, that code runs now but constraint is not
applied, for example

scalar checka = (alpha>0)
scalar checkb = (beta>0)
scalar checkc = (gamma1>0)
scalar check = checka+checkb+checkc

applied to my model gives

                estimate     std. error   t-ratio     p-value
   -----------------------------------------------------------
   mu          0,000115904   0,00314962    0,03680   0,9706
   omega       0,0991130     0,00457944   21,64      7,07e-104 ***
   alpha       0,199138      0,0100301    19,85      1,02e-087 ***
   beta        0,157351      0,0323213     4,868     1,13e-06  ***
   gamma1     -1,78166       2,06923      -0,8610    0,3892

I did not supply whole code and data because I want to stick to
avaliable data in the gretle.

If I use only for example scalar check = (alpha>0)
I get:

Data types not conformable for operation



On 29.11.2009. 13:26, Davor Horvatic wrote:
> I'll try immediately, thanks. But still question remains why this
> does not work in original form. I took code from
> the end of section 17.2.
>
> Thanks once more,
> Davor
>
> On 29.11.2009. 13:06, Berend Hasselman wrote:
>    
>> On 29-11-2009, at 12:27, Davor Horvatic wrote:
>>
>>
>>      
>>> ? mle ll = check ? (-0.5*(log(h) + (e^2)/h))
>>> ? series e = y - mu
>>> ? series h = var(y)
>>> ? series h = omega + alpha*(e(-1))^2 + beta*h(-1)
>>> ? scalar check = (alpha>0)&   (beta>0)
>>> ? params mu omega alpha beta
>>> ? end mle
>>> Syntax error in command line
>>>
>>> Error executing script: halting
>>>
>>>        
>>>> end mle
>>>>
>>>>          
>> A.
>> ---------------------------------------------
>> I replaced the&   in the scalar check = .. line  with&&
>> and got this
>>
>> ? mle ll = check ? (-0.5*(log(h) + (e^2)/h)) : NA
>> ? series e = y - mu
>> ? series h = var(y)
>> ? series h = omega + alpha*(e(-1))^2 + beta*h(-1)
>> ? scalar check = (alpha>0)&&   (beta>0)
>> ? params mu omega alpha beta
>> ? end mle
>> Data types not conformable for operation
>>
>> Error executing script: halting
>>
>>      
>>> end mle
>>>
>>>        
>> B.
>> ----------------------------------------------
>> I replaced the line scalar check ... by the following three lines
>>
>> scalar checka = (alpha>0)
>> scalar checkb = (beta>0)
>> scalar check = checka+checkb
>>
>> and now the script runs without error to completion.
>>
>> Berend
>> _______________________________________________
>> Gretl-users mailing list
>> Gretl-users at lists.wfu.edu
>> http://lists.wfu.edu/mailman/listinfo/gretl-users
>>
>>      
> _______________________________________________
> Gretl-users mailing list
> Gretl-users at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>    


More information about the Gretl-users mailing list