Dear Researchers, hope everyone blessed with healthy life.
I've a column (in Excel) with different unique titles (in textual form) =187,000. The number of total observation of this column is 342,000 (non-structured panel). I want to keep only the top 10 headings that are assigned maximum number of observations in the panel.
i generate the group ID by the following command, but next i don't know how to drop or keep for the top 10 maximum number of observation:
egen id=group( title )
Thanks Researchers and Admin
Related Posts with Drop or Keep Observations by title
Identifying sequences in string variables across observationsHello. I have string data in the format described below. I want to generate a new variable "Pregnanc…
Can PPML be used beyond gravity models?Dear All, I am helping a friend with some Stata coding. I am myself not an expert. They have a cou…
How I can egen a variable to capture the sum value of numbers in the different columnsDear Stata users, I am working on a dataset with many dummy variables. What I want to achieve is eg…
vce(cluster var1 var2) varlist not allowed r(101)Hi!, I am trying to run fixed effect with two-way clustering. For instance: reghdfe capx x1 x2, abs…
Replace if value is a dateHi, I am trying to replace the value of one variable when the condition holds (the condition is that…
Subscribe to:
Post Comments (Atom)
0 Response to Drop or Keep Observations by title
Post a Comment