Backward cumulative observations of a series.
Increasing samples calculation of the number of non-missing observations
in .Syntax: @cumbobs(x[, s])
x: series
s: (optional) sample string or object
Return: series
Compute the number of non-missing values in
x from
to the end of the workfile or from
to the end of the optional sample
s.
This function is panel aware.
Examples
series x = @recode(@rnd > 0.5, @nrnd, na)
show x @cumbobs(x)
produces a spreadsheet with two columns correspond to x and @cumbobs(x). The second series (which corresponds to @cumbobs(x)) starts at the count returned by @obs(x) and decrements in those observations where x is non-NA.
Cross-references
For the forward variant of this function, see
@cumobs.