On Sun, 29 Nov 2009, Berend Hasselman wrote: > On 29-11-2009, at 15:24, Davor Horvatic wrote: > > > OK, I figured out the correct code, so please confirm that I interpret > > correctly. > > Restriction criteria has to be written as > > > > scalar check = (alpha>0) && (beta>0) > > > > That is what I tried and got the error message > > Data types not conformable for operation > > Error executing script: halting > > If it does work for you, something weird is going on. > > I am running Gretl 1.8.6 on Mac OS X 10.6.2. > > We'll have to wait for the Gretl guru to have a look at this.
;-) This is a subtle bug (if it's a bug; I'm not sure) with an easy workaround. With the initialization scalar alpha = 0.4 scalar beta = 0 The "check" condition -- alpha>0 && beta>0 -- is violated on the first iteration. Therefore the formula for "ll" comes down to ll = NA This generates a scalar value, which is not allowed in the mle context. The fix is to initialize such that the check is satisfied on the first round, e.g. scalar beta = 0.001 Even if one didn't get a scalar for ll, I don't think that mle would work with the constraint not satisfied at the start. The first thing we do is use the ll formula to check for missing values, and that can't work if the entire series is NAs. Allin.
