On Fri, 15 Jun 2018, Riccardo (Jack) Lucchetti wrote:
That said, adding a fifth argument is defintely doable, so I'll
see if I can
get it done in the next few days.
Done; it's in git now. A little test script comparing old and new syntax
follows:
<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
set nadarwat_trim 2
series o5 = nadarwat(HA, WA, 2.0) # bw = 2
series o6 = nadarwat(HA, WA, -2.0) # bw = 2, leave-one-out
series o7 = nadarwat(HA, WA, 0.05) # bw = 0.05
series o8 = nadarwat(HA, WA, -0.05) # bw = 0.05, leave-one-out
# new_style
set nadarwat_trim 4
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 n6 = nadarwat(HA, WA, 2.0, 1, 2) # bw = 2, leave-one-out, trim = 2
series n7 = nadarwat(HA, WA, 0.05,, 2) # bw = 0.05, trim = 2
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
# checks
printf "check 1: %s\n", max(abs(n2 - o2)) ? "Fail" : "OK"
printf "check 2: %s\n", max(abs(n4 - o4)) ? "Fail" : "OK"
printf "check 3: %s\n", max(abs(n6 - o6)) ? "Fail" : "OK"
printf "check 4: %s\n", max(abs(n7 - o7)) ? "Fail" : "OK"
</hansl>
There are two things left to do (apart from testing):
1) update the docs
2) provide some way to have auto bandwidth choice in the GUI element
I can take care of 1) but I'm definitely out on my depth for 2). Could you
have a look, Allin?
-------------------------------------------------------
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
-------------------------------------------------------