Hi there,
I am trying to remove 2-digit sic codes for which my dataset has less than 10 companies.
I have made a numerical variable of the first two digits of the sic code:
gen sic2 = substr(sic,1,2)
destring sic2, gen(sicnum2)
Does someone know what type of command I should put based on number of companies conditional? Note that I have data for various years per company.
Hope someone can help out.
Kind regards,
Sarah
Related Posts with removing 2-digit sic-codes with <10 companies
New package predsurv on SSCThanks as always to Kit Baum, a new package predsurv is now available for download from SSC. In Stat…
import data from excel to stata-change the structure of the dataHi, I have a data file in excel which includes more than 300 firms. Information for each firm inclu…
Syntax for lincom won't work in Stata 16 but works fine in Stata 15Hello all. I'm a professor at Baldwin Wallace. On Thursday, I tried to run a lab with my class from …
How to tag outliers?Hi, I would like to create a dummy that's equal to 1 if it's an outlier, and 0 if not. I can use -ex…
Creating unique group ID variableDear all I have a hopefully trivial question that I can't get my head around right now. My data set…
Subscribe to:
Post Comments (Atom)
0 Response to removing 2-digit sic-codes with <10 companies
Post a Comment