Hi Jack,
My two pence for the sake of testing.
Your script stops after estimating two models telling:

Argument 1 must point to a state-space bundle
>> ksmooth(&mod)

I'm using gretl 2021d (30/09/21) on macOS Big Sur

Best,
Artur


Le mar. 25 janv. 2022 à 09:15, Riccardo (Jack) Lucchetti <p002264@staff.univpm.it> a écrit :
On Tue, 25 Jan 2022, Riccardo (Jack) Lucchetti wrote:

> On Tue, 25 Jan 2022, Paolo Chirico wrote:
>
>> Dears,
>> for a simulation study I want to repeat the estimate of a state space model
>> /N/ times. Repeating the estimate is not a problem, but if I call the
>> ksmooth function after each estimate (MLE block), gretl allows me it on the
>> first iteration, but not the following ones.
>> It appears that the function cannot find the bundle in subsequent
>> iterations
>> This happens if the repetitions occur in a single script run.
>> Obviously it doesn't happen if every rep has its own run.
>> It's really strange!
>> Is it a bag or am I missing something?
>
> It sounds like a bug, Paolo, thanks for the report.
>
> Could you send us an example script exposing the problem?

This script runs without problems here, but I'm running current git: in
the
next version (due real soon) the whole Kalman apparatus has been revised
quite thouroughly. Or maybe I misunderstood the problem. Paolo, could you
check if this script runs on your machine?

<hansl>
set verbose off
nulldata 100
setobs 1 1 --special-time-series

loop i = 1 .. 4
     # ma(1) example with known variance
     e = normal()
     theta = 0.8
     y = e + theta * e(-1)

     smpl +1 ;

     par = 0.8
     T = {0,0;1,0}
     Q = {1,0;0,0}
     mod = ksetup(y, {1; par}, T, Q)
     mle ll = misszero(llik)
         mod.obsymat[2] = par
         kfilter(&mod)
         series llik = mod.llt
         params par
     end mle --hessian

     ksmooth(&mod)
     series e$i = mod.state[,1]
     smpl full
endloop
</hansl>



-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti@univpm.it
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/