On Mon, Jun 15, 2026 at 4:23 AM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
Am 14.06.2026 um 19:35 schrieb Cottrell, Allin:
> For authors of function packages: there are new restrictions that can
> be added to the ui-maker function for a package, to ensure for a given
> series parameter (a) that the argument is a 0/1 dummy variable or (b)
> that it is discrete.
>
> Here's an example, assuming that the bundle returned by the ui-maker
> is called ret; that the series y must be binary; and that the series z
> must be discrete:
>
> ret.y = _(binary=1)
> ret.z = _(discrete=1)
>
> Note that the criterion in the "discrete" case is a bit more liberal
> than the built-in isdiscrete() function. More details can be found in
> the current version of pkgbook.pdf (or pkgbook-a4.pdf).
>
Thanks, Allin - but any reason why the two discreteness checks should be
different? (Sorry, haven't looked at pkgbook yet.)
That point is debatable. Perhaps the isdiscrete() function should act
in the "more liberal" way, since if you want to know whether a series
is explicitly marked as discrete you can check the "discrete" member
of the bundle returned by getinfo(). To see what exactly the more
liberal variant does, take a look at gretl_isdiscrete() in
gretl_utils.c.
Allin