I want to count the number of unique ID's per year and group. I have managed that with the following code:
Code:
egen n_id_total = nvals(id), by(year, group)
Code:
egen n_id_total_condition = nvals(id) if condition == 1, by(year, group)
Specialized on Data processing, Data management Implementation plan, Data Collection tools - electronic and paper base, Data cleaning specifications, Data extraction, Data transformation, Data load, Analytical Datasets, and Data analysis. BJ Data Tech Solutions teaches on design and developing Electronic Data Collection Tools using CSPro, and STATA commands for data manipulation. Setting up Data Management systems using modern data technologies such as Relational Databases, C#, PHP and Android.
egen n_id_total = nvals(id), by(year, group)
egen n_id_total_condition = nvals(id) if condition == 1, by(year, group)
0 Response to Count unique observations by grouping vars if conditions is met
Post a Comment