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: Count the number of observation of the same kind


From   George Chioran <[email protected]>
To   [email protected]
Subject   st: Count the number of observation of the same kind
Date   Sat, 24 Apr 2010 07:04:35 -0700 (PDT)

Dear statalisters, 

This may be a basic question, but how can you create a  variable X in which there we have the sum of the observations of the same kind of variable Y?
If variable Y has 10 integers: 8, 8, 5, 5, 5, 3, 1, 1, 1, 1 variable X would the integers 2, 2, 3, 3, 3, 1, 4, 4, 4, 4?

Thank you a lot for any ideas.

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