I am conducting a cross-sectional study of UK FTSE 100 firms. I want to group companies by industry into less than 20 industry groups. I initially used the following code which created individual groups for individual values of the industry codes (variable 'industry').
sort industry by industry: gen newid = 1 if _n==1 replace newid = sum(newid) replace newid = . if missing(industry) However, under the 2007 SIC codes, there are many that can be grouped into larger subsets and I desire to do this for meaningful analysis. I need suggestions for generating a new industry variable where I can decide how many SIC codes can fall under one category. For example, codes 30000 to 39999 = 3, 4000 to 47999 = 4 etc.
Related Posts with Grouping Data
Multicollinearity, VIF and interactionHello I have seen many posts (questions and responses) related to multicollinearity, VIF and interac…
What diagnostic tests should be conducted after beta regression?Hello, I estimated a beta regression with dependent variable that falls strictly within the range of…
bysort commandHello, I have a clarificatory question about the bysort command. Suppose in my datafile HHID is the …
Deriving R2 with mi estimate: mixedHi everyone, I am interested in tabulating the mean level 1 explained variance Array and mean total …
LPM interpretation. Dummy dependent variable and Log independent variableHi everyone. I have a confusion on how to interpret a LPM where we have a dummy dependent variable …
Subscribe to:
Post Comments (Atom)
0 Response to Grouping Data
Post a Comment