Ok, folks, I just pushed to git an extension of the nadarwat() function.
The third argument is now optional: if present, it works just like before.
If absent or zero, the bandwidth is automatically calculated as suggested
by Andreï in his message a few weeks back:
http://lists.wfu.edu/pipermail/gretl-devel/2018-May/008800.html
A fourth optional parameter is a Boolean flag to force the leave-one-out
estimator.
The following script illustrates the new syntax (not documented yet)
<hansl>
set verbose off
open mroz87.gdt --quiet
dataset sortby WA
# old_style
series o1 = nadarwat(HA, WA, 2.0) # bw = 2
series o2 = nadarwat(HA, WA, -2.0) # bw = 2, leave-one-out
series o3 = nadarwat(HA, WA, 0.05) # bw = 0.05
series o4 = nadarwat(HA, WA, -0.05) # bw = 0.05, leave-one-out
# new_style
series n2 = nadarwat(HA, WA, 2.0, 1) # bw = 2, leave-one-out
series n4 = nadarwat(HA, WA, 0.05, 1) # bw = 0.05, leave-one-out
series n_auto1 = nadarwat(HA, WA) # bw = auto
series n_auto2 = nadarwat(HA, WA, 0) # bw = auto
series n_auto3 = nadarwat(HA, WA, , 1) # bw = auto, leave-one-out
series n_auto4 = nadarwat(HA, WA, 0, 1) # bw = auto, leave-one-out
gnuplot n_auto1 n_auto3 WA --with-lines --fit=none --output=display
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------