On Mon, Mar 10, 2025 at 10:10 AM Cottrell, Allin <cottr...@wfu.edu> wrote:
>
> On Mon, Mar 10, 2025 at 7:22 AM Paolo Chirico <paolo.chir...@uniupo.it> wrote:
>>
>> I have prepared a function to estimate stochastic volatility models with 
>> three different QML procedures (which I attach with a datafile).
>> The first procedure is the classic QML, while the other two use time-varying 
>> state space models, so they use update functions.
>> The script runs fine with all the procedures, Jack has already seen it.
>> However, after creating the package, only the first procedure works well, 
>> while with the other two I get the message:
>>
>> This function needs a dataset in place
>> The formula 'ERR = kfilter(&SVM)'
>>  produced an error on execution
>> *** error in function svm_qm2, line 133
>
> Paolo,
>
> Your package should work if you set its "data-requirement" to "no-data-ok" 
> (either via spec file or the packaging GUI).
>
> I have to say that at this point I don't understand why that's necessary, but 
> I'll try investigating further.

OK, now I see what was happening. The error was, as you thought,
related to the TV* updater functions. But there was nothing wrong with
your hansl code, rather the built-in kfilter() function was performing
a misguided check on the updaters. This is now fixed in git, and the
fix will be in gretl 2025a, due out soon. In the meantime a
not-very-nice workaround is as I said: pretend that your package
doesn't need a dataset in place.

Allin
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/

Reply via email to