Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: simple question (freq)


From   Matt Spittal <[email protected]>
To   <[email protected]>
Subject   Re: st: simple question (freq)
Date   Thu, 16 Apr 2009 10:47:14 +1000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index