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
Create a chart to track changes of exectuive titlesHi Statalist,
I want to create a chart to record the title changes of exectuives.
For example, I w…
Problem with calculating particular percentages of flowsGood morning, first of all these are the first times I am using Stata, so this could be a very eleme…
My nl equation has an error, please help!Hello everyone,
I am trying to estimate the parameters a and c of a nonlinear equation. The nonline…
Loop over quarterly variables to find yearly meansHi Everyone,
I'm quite new to Stata (version 17.0) and I'm having some trouble implementing a loop …
xtivreg2 and interpretation of post estimation resultsHi,
I am running an xtivewg2 command using some instrumental variables. I would like to reconfirm m…
0 Response to Simple by() and 'if' question
Post a Comment