I feel like this should be simple, but I'm struggling to code this. What I tried was:
Code:
by id: gen active = 1 if year == 2019 by id: replace active = 0 if year != 2019
Does anyone have any advice here?
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.
by id: gen active = 1 if year == 2019 by id: replace active = 0 if year != 2019
0 Response to Simple by() and 'if' question
Post a Comment