[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-06 Thread Sven Schreiber
Am 06.05.2021 um 13:02 schrieb Allin Cottrell: On Thu, 6 May 2021, Sven Schreiber wrote: Am 06.05.2021 um 10:05 schrieb Sven Schreiber: Right, but I'm wondering whether this isn't inefficient because the ok values are overwritten with themselves. Or aren't they internally? BTW, shouldn't t

[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-06 Thread Allin Cottrell
On Thu, 6 May 2021, Sven Schreiber wrote: Am 06.05.2021 um 10:05 schrieb Sven Schreiber: Right, but I'm wondering whether this isn't inefficient because the ok values are overwritten with themselves. Or aren't they internally? BTW, shouldn't this work? matrix m = {1, NA} eval misszero(m[2

[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-06 Thread Sven Schreiber
Am 06.05.2021 um 10:05 schrieb Sven Schreiber: Right, but I'm wondering whether this isn't inefficient because the ok values are overwritten with themselves. Or aren't they internally? BTW, shouldn't this work? matrix m = {1, NA} eval misszero(m[2]) I'm getting an error "is matrix not ser

[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-06 Thread Sven Schreiber
Am 06.05.2021 um 09:42 schrieb atecon: Am 06.05.2021 08:38 schrieb Sven Schreiber: I'd say it's expected because nans propagate. Basically you don't know what 3 + nan is. To get what you want, I was going to say "do cum(misszero(m))", but that doesn't work on a matrix. Maybe it should? (But r

[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-06 Thread atecon
Am 06.05.2021 08:38 schrieb Sven Schreiber: Am 06.05.2021 um 07:42 schrieb atecon: Hi all, I just would like to ask whether this behavior is actually expected: matrix m = {1, NA; 2, 3} print m eval cum(m) ? print m m (2 x 2)     1   nan     2 3 ? eval cum(m)     1   nan     3   nan

[Gretl-devel] Re: Cumulated values of matrix with missing values

2021-05-05 Thread Sven Schreiber
Am 06.05.2021 um 07:42 schrieb atecon: Hi all, I just would like to ask whether this behavior is actually expected: matrix m = {1, NA; 2, 3} print m eval cum(m) ? print m m (2 x 2)     1   nan     2 3 ? eval cum(m)     1   nan     3   nan I expected the entry (2,2) to be 3 as this