Am 14.06.2018 um 08:52 schrieb Riccardo (Jack) Lucchetti:
On Thu, 14 Jun 2018, Sven Schreiber wrote:
> Am 14.06.2018 um 07:17 schrieb Riccardo (Jack) Lucchetti:
>> On Wed, 13 Jun 2018, Sven Schreiber wrote:
>>
>>> I don't see why we need to rename and deprecate the nadarwat
>>> function to achieve what you want. In the old version the user
>>> always has to give y, x and h (bandwidth). Plus in the background
>>> there is the nadarwat_trim setting (default 4).
>>>
>>> So if we extend the function as you say, then only two things need
>>> to be done internally if the function is called with only the first
>>> three args:
>>> 1) Check whether bandwidth is negative. If so, set leave_one_out to
>>> 1 and bandwidth to abs(bandwidth).
>>> 2) Check whether the nadarwat_trim value is != 4. If so, set the
>>> trim arg to that value.
>>
>> My concern is: how do you get automatic bandwidth selection and the
>> leave-one-out option together? I guess that, in your scheme, you
>> could leave the third argument empty and set the fourth one to 1,
>> but it looks sort of awkward to me. Anyway, it's a possibility.
Right, a call like nadarwat(x, y, , 1) or nadarwat(x,y, 0, 1) would be
required for that.
[BTW, before there's a misunderstanding: We're not really talking about
a hansl function, but the built-in libgretl function in C. Just using
hansl as pseudocode.]
Ok, something like
<hansl>
function series nadwat(seties y, series x, scalar bandwidth[0],
bool leave_one_out[0], scalar trim[4])
So what's the difference? I mean, how do you get your auto bandwidth and
the leave_one_out thing together. Exactly like in my proposal, no?
> and also you put the default for leave_one_out to 0 whereas
verbally
> it sounds as if you want to have 1. So this is confusing.
I have no strong opinion on this. Either 0 and 1 are equally tenable
default values, in my opinion.
OK.
cheers,
sven