Cumulative missing observations of a series.
Increasing samples calculation of the missing (NA) observations
in .Syntax: @cumnas(x[, s])
x: series
s: (optional) sample string or object
Return: series
Compute the number of missing (NA) values in x from the start of the workfile or sample s, up to the current observation.
This function is panel aware.
Examples
series x = @recode(@rnd > 0.5, @nrnd, na)
show x @cumnas(x)
produces a spreadsheet with two columns correspond to x and @cumnas(x). The second series (which corresponds to @cumnas(x)) starts at 0 (if the first observation in x is non-NA) or 1 (if the first observation in x is NA) and increments in those observations where x is NA.
Cross-references
For the backward variant of this function, see
@cumbnas.