Hello,
I wanted to see the distribution of firms in the various industry areas (based on the first 2 digits of SIC codes). Here is what I've written and the error obtained:
// 1. SIC (2 digits) classification:
// we create a string variable (sic2) with the first 2 digits of sic in order to indentify the industry
gen sic2=substr(sic,1,2)
// we encode the variable so that we obtain a numeric variable instead of a string one
encode sic2, generate (SIC2)
// next we generate variable SIC_group to group the various sic into the appropriate industry
recode SIC2 (01/09=0) (10/14=1) (15/17=2) (20/39=3) (40/49=4) (50/51=5) (52/59=6) (60/67=7) (70/89=8) (91/97=9) (else=.), generate(SIC_group)
Unfortunately, when I check the variable SIC_groups, I obtain that firms with SIC 7363, so with a SIC2 of 73, are placed in group 6, which is wrong. The error occurs also in other groups and sic.
Also, do you know which command can I use later to see the number of GVKEY per industry group?
Has someone any idea what to do?
Thank you in advance
Related Posts with Distribution of firms by industry (based on SIC codes)
VAR Model: Ommited data for lagged variablesDear All, Firstly, sorry I can't attach my result tables here. I am struggling to figure out how to…
General questions on Latent Class Analysis / no. of variables / model fitDear all, I have some general questions on Latent Class Analysis that are probably not really Stata…
Using GSEM to predict multinomial logit with different choice setsI am trying to build a multinomial logit model using GSEM as I want to incorporate random effects. M…
Coefficients above 1I am running a two regression analysis. One between DA and both PROT and AUFEE (DA is the dependent …
How to save IV first stage (preferably using ivregress and esttab commands)Hello I want to estimate a model like this: Code: xi: ivregress 2sls depvar (ib3.instrumented = …
Subscribe to:
Post Comments (Atom)
0 Response to Distribution of firms by industry (based on SIC codes)
Post a Comment