I am working with a panel of UK industries from 1997-2018, and wish to group some of these industries. I have already created an industry identifier variable using the command
encode industry, gen(ID)
Each industry is represented by a letter from A to S, and the industries I wish to group together are B,D,E,K,L
How exactly can I achieve this? Ideally I will generate a variable named something like highprodind which is equal to 1 for the aforementioned industries.
Thanks
Related Posts with Creating subgroups in panel data
merging two variables with different values into oneHello all, I am new to Stata, and have a midterm exam. I am hoping someone can help with a newbie qu…
Implementing Lee Bounds in STATAHi everyone, I am using data from a randomized controlled trial to estimate lee bounds since I have…
How to get p values in -mi estimate- commands like in RHi, Is there a way to get precise p values in Stata using multiple imputed data like its provided in…
Label variables ascending orderHi, I am using Stata 17. I have 61 variables in my dataset (q1-q61). I would like to label them as…
Saving margins results in a program to use it in simulateDear all, I have written the following program Code: program define myprog1 replace pseudoclass …
Subscribe to:
Post Comments (Atom)
0 Response to Creating subgroups in panel data
Post a Comment