Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Creating Yearly Totals from 12 Months


From   Thomas Speidel <[email protected]>
To   [email protected]
Subject   st: Creating Yearly Totals from 12 Months
Date   20 Mar 2005 17:40:11 -0700

Dear Statalisters:

I am trying to modify the following dataset so that for each year I obtain a total:

    month       var1  
         1   3.407265  
         2    4.27602  
         3   4.171527  
         4   4.069176  
         5   4.063006  
         6   4.142096  
         7   4.280849  
         8   4.443652  
         9   4.612175  
        10   4.785601  
        11   4.959064  
        12   5.129404  
        13   5.291652  
        14   5.443335  
        15   5.584059  
        16   5.714371  
        17   5.834095  
        18   5.943435  
        19   6.043005  
        20    6.13373  
        21   6.216306  
        22   6.291237  
        23   6.359303  
        24   6.420962  
        ...

This is was I am trying to achieve:
       
    year	var1_yrtot
	1	52.33984
	2	71.27549


Is there an easy/elegant way to do that?
Thanks,

Thomas Speidel

---- Alberta Cancer Board

This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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