On 09.10.2017 14:54, Riccardo (Jack) Lucchetti wrote:
On Mon, 9 Oct 2017, Artur T. wrote:
> Dear all,
>
> just by chance I've found a bug (at least realized using 4-day old
> git on ubuntu). When adding a lagged intercept to the ordered probit
> model, gretl gets captured in infinite computation (I would call this
> a 'crash'):
>
> <hansl>
> open ooballot -q
> smpl Status > 0 --restrict
> # works
> probit Vote 0 CPI
> # crashes (infinite computation)
> series const_1 = const(-1)
> probit Vote 0 const_1 CPI
> </hansl>
The problem lies in the function we use for removing the constant from
a list (list_purge_const in discrete.c), which doesn't handle well the
"lagged constant" case.
However, I was thinking: can lagging the constant ever make sense, in
any situation? Shouldn't const(-1) be a no-op?
I cannot think of any situation
where const(-1) does make sense at all.
It was just by coincidence included in a list of regressors I worked
with. Nevertheless, I guess it would be good if gretl would return an
error in this case. Wouldn't it make sense to pre-check whether there is
any series (apart from the intercept) with variance=0?
Artur