On Fri, Jul 25, 2025 at 3:11 PM Sven Schreiber <sven.schreiber@fu-berlin.de> wrote:
>
> Am 25.07.2025 um 19:27 schrieb Allin Cottrell:
> >
> > It's something to do with lags. With time-series data and a
> > specification that includes lags (like yours), SSR goes NaN and
> > therefore BIC goes NaN when a regressor that's a lag is omitted.
>
> I think it's more subtle - I have variations here where some lags are
> omitted and BIC is OK, and then later the problem happens.

It's more specific than I indicated: things go wrong as soon as a lagged regressor that is not the last regressor at the time, gets omitted.

The regressors will have been reordered, if necessary, at the start of the backward stepwise procedure, to increase the likelihood that terms to be omitted will come at the end, which simplifies things considerably. But that's not going to work 100%. When we have to eliminate an "internal" column of Q, and row/column of R, the recomputation that's needed involves reference to the dataset, but at what starting point? We were diving in at dset->t1, but in a specification with lags it should be at orig->t1, where @orig is the original model. That's a distinction without a difference in the case of cross-sectional data, but it's crucial for time series with lags. Now that's fixed in git.

Allin