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
Keeping most full observation in a hierarchyHi, I have a dataset that is a hierarchy set over a maximum of 4 levels where each row is a level i…
generating new variable based on date variableDear Stata community, I have a variable stored as dates in the Stata format i.e 01jul1993 (I conver…
Recode with if does not workHi all, I have the following problem. I am trying to recode values of a variable conditioning on giv…
Using putexcel to enter output from a cross tabulationDear all, Seeking some advice on how to export a specific format of output into Excel, from tabulat…
Procedure to select the variable with values closest to the values to another variableIs there any automatic procedure in Stata to do the following: I have a fairly short time-series da…
Subscribe to:
Post Comments (Atom)
0 Response to How To Count Identical Values As One Without Dropping
Post a Comment