On 02/01/2025 13:35, Sven Schreiber wrote:
Am 19.12.2024 um 20:13 schrieb Sven Schreiber:
I tried to replicate this problem with a public dataset, but that
wasn't so easy.
Here's a script that replicates the problem:
<hansl>
nulldata 11
x = normal()
d = !(index % 3)
dataset addobs 1
print -o
<hansl>
Note that the dataset is not even declared as time-series. I guess we
should have to revisit the real_periodic_dummy() function in
lib/src/dataset.c.
One of the things I'd do (but wouldn't fix the problem you spotted) is
to change the code block
maybe_extend_dummies(dset, oldn);
if (dataset_is_time_series(dset)) {
maybe_extend_lags(dset, oldn, dset->n - 1);
}
at line 1121 by moving the call to "maybe_extend_dummies(dset, oldn)"
inside the if block: I don't think this should be done for a
cross-sectional dataset (maybe for panel datasets...).
-------------------------------------------------------
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
-------------------------------------------------------