Sebastián,
The equivalent function in Stata is -sum-, i.e. -generate var =
sum(variable)-.
To given an example from the auto dataset
sysuse auto, clear
generate sum_weight = sum(weight)
-- Matt
[email protected]
On 16/4/09 7:17 AM, "Sebastián Daza" <[email protected]> wrote:
> Hi everyone,
>
> Does somebody know how to create a new variable with the accumulated
> frequency of a variable? It's very simple in SPSS:
>
> create var=csum(variable).
>
> Until now I haven't been able to do it with STATA
>
> Regards
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/