I have the following data set:
CompanyName CompanyID
Tyco 1235
Tyco Inc. 1236
TycoCo 4567
Brown 1342
Green Deal 1434
Green Deals 1344
Ferrari 1343
Ferrari Inc 1359
Ferraris US 7897
I want the following data set:
CompanyName CompanyID GroupID
Tyco 1235 1
Tyco Inc. 1236 1
TycoCo 4567 1
Brown 1342 2
Green Deal 1434 3
Green Deals 1344 3
Ferrari 1343 4
Ferrari Inc 1359 4
Ferraris US 7897 4
I tried using a "cross" function, but it blew up because of what I assume was the number of observations (10,000+).
What would be the best way to accomplish what I am trying to get? I am using Stata 18.
Thank you!
CompanyName CompanyID
Tyco 1235
Tyco Inc. 1236
TycoCo 4567
Brown 1342
Green Deal 1434
Green Deals 1344
Ferrari 1343
Ferrari Inc 1359
Ferraris US 7897
I want the following data set:
CompanyName CompanyID GroupID
Tyco 1235 1
Tyco Inc. 1236 1
TycoCo 4567 1
Brown 1342 2
Green Deal 1434 3
Green Deals 1344 3
Ferrari 1343 4
Ferrari Inc 1359 4
Ferraris US 7897 4
I tried using a "cross" function, but it blew up because of what I assume was the number of observations (10,000+).
What would be the best way to accomplish what I am trying to get? I am using Stata 18.
Thank you!
Comment