Dear Stata Community,
I'm trying to 'count the number of years each person attended the conference over the period of 20 years'. Datasets year's values are oftentimes repeated its because when a person attends the conference more than once a year. I tried 'collapse (count) Year, by (Attendance Persons)', however, as expected, the code is also counting the repeated years giving me more than 20 years of attendance for some of the people in the dataset. I would really appreciate if you could show me some guidance to fix the problem.
This is my first post and I'm very new to the Stata. Please let me know if I'm being unclear.
Thank you so much in advance.
Best wishes,
David
Related Posts with How To Count Identical Values As One Without Dropping
Summation of several rows using the if conditionHello, I want to write a code that creates a value which is the summation of several rows. I have n…
Collapse command error message that has me stumpedI'm using the Collapse command in Stata to aggregate a series of numbers by different categories. Th…
How can I modify the variable label of a table output?Hi masters, I use table command to create a table, but I'm not satisfied with the table's output. T…
fillin or expand?Dear All, The question is related to a previous post here. Now, the expanded data is Code: * Exampl…
Reverse Command Lookup for .gph File?Hi Everyone, I'm new to Stata, so apologies for the newbie question here. I'm wondering if there's …
Subscribe to:
Post Comments (Atom)
0 Response to How To Count Identical Values As One Without Dropping
Post a Comment