Dear all,
I have this problem that I hope you may help me.
I have a list of companies name and a list of ticker symbols for each company. For instance, the company Apple has the ticker AAPL.
I want to regress the first letter of the company name on the first letter of ticker symbol.
I have a panel data.
This is what I've done:
Now, for the purpose of the regression I need to convert the letters in numbers. For example "A" is "1", "B" is "2" and so forth.
Do you have any suggestions?
Moreover, there are some companies which the name starts from a number, how can I solve it? In this case I should assign them a different value. For instnace if a company first letter is A, the value assigned to that letter could be 1. But what about a first company letter that is 1? I hope you see my point
Finally, since it is a panel data, and I have 16.032 unique firms (with a unique identifier, namely the GVKEY) how can I perform a regression focusing only one time for each firm?
To be more clear, I cannot do
Because I'm missing companies that are in the database in 2015 and not in 2019 for instance. I should do a regression for only 16032 observations
Thank you in advance for your time and help
I have this problem that I hope you may help me.
I have a list of companies name and a list of ticker symbols for each company. For instance, the company Apple has the ticker AAPL.
I want to regress the first letter of the company name on the first letter of ticker symbol.
I have a panel data.
This is what I've done:
Code:
gen firstic= substr(tic,1,1) gen firstconm= substr(conm,1,1) encode firstic, gen(ticletter) encode firstconm, gen(conmletter)
Do you have any suggestions?
Moreover, there are some companies which the name starts from a number, how can I solve it? In this case I should assign them a different value. For instnace if a company first letter is A, the value assigned to that letter could be 1. But what about a first company letter that is 1? I hope you see my point
Finally, since it is a panel data, and I have 16.032 unique firms (with a unique identifier, namely the GVKEY) how can I perform a regression focusing only one time for each firm?
To be more clear, I cannot do
Code:
reg firsttickerletter firstcompanyletter if year==2019
Thank you in advance for your time and help
Comment