Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Counting months over several years in a variable


From   George Chioran <[email protected]>
To   [email protected]
Subject   st: Counting months over several years in a variable
Date   Sat, 29 May 2010 06:06:31 -0700 (PDT)

Dear statalisters, 
 
I want to count the
months in several years. I have variables year and month, and want to obtain
variable mvar. My database looks like this. 

Year       month  mvar
2008       8             1
2008       9             2
2008       10     3
2008       11           4
2008       12           5
2009       1             6
2009       2             7
2009       3             8
…             …             …
 
Thank you in advance
for your help, 
George


      

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index