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

st: creating count within id clarification


From   "Richard Hiscock" <[email protected]>
To   <[email protected]>
Subject   st: creating count within id clarification
Date   Sun, 27 Feb 2005 16:49:34 +1100

Thanks for you quick reply
Sorry that is was not clear. I have added visitno[_n] - that is obtained from program statement
& visitno to indicate what Im after.
the date can be the same for different ids and the number of observations for each date
with id can vary from 1-20+. The final aim is to generate summary data (max value, means etc) for var* at each date within id

I have the following data structure

id date var1 var2 visitno visitno[_n]

1 16267 x 53 1 1
1 16267 y 106 1 2
1 16267 y 84 1 3
1 16267 y 90 1 4
1 16267 z 76 1 5
1 16267 z 65 1 6
1 16298 x 87 2 1
1 16298 y 76 2 2
2 15678 x 98 1 1
2 15678 y 98 1 2
2 16541 x 150 2 1
2 16541 x 76 2 2
2 16541 x 76 2 3
2 16541 y 56 2 4

thanks Richard

*
* 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