Hi folks, hope you are all doing well.
I have one variable with many values, each of them can appear in many number of observation (some will appear in just one, some will appear more), and I have another variable which also have many values. Most of the values in the first variable will be connected to only one value in the second variable, but some of them will be connect to more than one value. I want to mark the observations with values in the first variable that get more than one value in the second variable.
I thought to use the command egen (bysort var1: egen var3 = functin(var2)) to create new variable for this, but I don't find the right function. Can you help me with this please? of curse not just restricted to help based on the egen command.
Thank you!
Fitz
I have one variable with many values, each of them can appear in many number of observation (some will appear in just one, some will appear more), and I have another variable which also have many values. Most of the values in the first variable will be connected to only one value in the second variable, but some of them will be connect to more than one value. I want to mark the observations with values in the first variable that get more than one value in the second variable.
I thought to use the command egen (bysort var1: egen var3 = functin(var2)) to create new variable for this, but I don't find the right function. Can you help me with this please? of curse not just restricted to help based on the egen command.
Thank you!
Fitz
Comment