I am interested in creating subsets from the appended dataset using uniquely identified ID. An example of dataset is below
clear
input
long ID str100 org_name int year
1234456 "Helping Hand" 1
1200081 "Caring Foundation" 1
1200081 "Caring Foundation" 2
9089081 "Save Children" 1
9089081 "Save Children" 2
9089081 "Save Children" 3
4532901 "Planet Earth" 2
end
I am interested in creating a subset of organizations that participated in more than 1 year. For example, ID 1200081 "Caring Foundation" participated in two years. So, I want to create a subset of these types of organizations and save it as a new dataset. Similarly, 9089081 "Save Children" participated in three years, hence save as another dataset. I am not interested in organizations that just participated in a particular year example 1234456 "Helping Hand" or 4532901 "Planet Earth" since they only participated in one year and hence not recurring.
Thanks for help!
Related Posts with Creating subsets from appended database
Following different portfolios over timeI have a data set of American companies over the period 1985-2015 with circa 300k observations of le…
Survival Time Data - Long Form - How do I generate a variable that indicates the number of observations at risk within a subgroup of data?I have a dataset on legal cases and individual hearings for each case, across multiple courts. I hav…
How to change value labels?My variable "q2" has two values: 1 and 2. Their labels are No and Yes, respectively. Now I want to …
Exporting two-way tabulation results to excel (in stata 14)Hello, I want to export two-way tabulation using (row option and survey weights) results to excel. …
Reshape long complicatedHi Statlist, I have a question for you about reshaping command. I have a quarterly sales dataset a…
Subscribe to:
Post Comments (Atom)
0 Response to Creating subsets from appended database
Post a Comment