help mata mm_colrunsum()-------------------------------------------------------------------------------

Title

mm_colrunsum() -- Running sum of each column

Syntax

numeric matrixmm_colrunsum(real matrix Z)

Description

mm_colrunsum()returns a matrix containing the running sum over each column ofZ. Missing values are treated as zero.

Remarks

mm_colrunsum()was written for Stata 9 and predates the release of official Stata'srunningsum()function in Stata 10. Changes have been made tomm_colrunsum()so that it redirects itself torunningsum()if used in Stata 10.

Conformability

mm_colrunsum(Z):Z: rxcresult: rxc

Diagnostics

mm_colrunsum()treats missing values as contributing zero to the running sum; they do not cause the running sum to become missing.

Source codemm_colrunsum.mata

AuthorBen Jann, ETH Zurich, jann@soz.gess.ethz.ch

Also see