Code:
//sort country wave id // gen newvar=1 if obs==1 //gen newvar=newvar(_n-1) if country(_n-1)=country //replace newvar=newvar(_n-1)+1 if country(_n-1)!=country
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.
//sort country wave id // gen newvar=1 if obs==1 //gen newvar=newvar(_n-1) if country(_n-1)=country //replace newvar=newvar(_n-1)+1 if country(_n-1)!=country
0 Response to Numbering new values of a variable 1 to N
Post a Comment