I have a list of firms that I am comparing to each other. Next I want to compare the NAIC code of each firm_id to each firm_id2 on each digit of the 6-digit level NAIC code. If the digit is the same, I am saying they are similar at the "X-level."
I am also trying to determine if the region is the same (same_reg) among two firms - do I generate another variable firm_id2 and then see if region matches across each firm?
Data:
firm_id M_Acq_Naic M_Acq_Reg
1 511210 "JP"
2 236116 "EU"
3 451120 "AM"
3 451120 "AM"
3 451120 "AM"
3 451120 "AM"
4 441110 "AM"
4 441110 "AM"
5 811310 "EU"
6 221119 "EU"
7 813212 "JP"
where similarity between firm 1 and 2 is 0. But similarity between firm 2 and 6 is 1 (first digit) and firms 6 and 8 are similar at the 2-digit level so similarity will be equal to 2.
where same_reg between firm 1 and 2 is 0 but is 1 between firms 3 and 4.
Thanks in advance for your help!
Related Posts with Creating Variable based on NAIC Digit Level match for Firms
Games-Howell-Test for postestimation of anova - available in Stata?Hello everybody, I conducted an anova for 11 groups with unequal variance and assume, that I need to…
Weights in Correspondence AnalysisGood day Stata users, I have constructed an index of categorical variables (0/1) using multiple cor…
Descriptive tableHello, I need some help creating a simple descriptive table. My data looks as follows: Array I w…
incorporating full information maximum likelihood function into the multiple regressionHi everyone, I am trying to handle missing values in a multiple regression model described below. I …
PPML estimation difficultiesHello everyone, I am currently working on my bachelor thesis and I am writing here to get some insig…
Subscribe to:
Post Comments (Atom)
0 Response to Creating Variable based on NAIC Digit Level match for Firms
Post a Comment