Dear all,
I think I have a relatively simple question which is giving me a hard time. I have daily data with abnormal returns (ar) for a sample of companies for a number of years. id is the company identifier and ind is the industry identifier. yearq is the year-quarter.
I would like to estimate the mean of ar for all other companies in the same industry, for every yearq. In other words, let's say for example that my first 10 companies (i.e., id=1, 2, ..., 10) belong to the first industry (ind==1). Given that my data is daily, I have daily abnormal returns for each of these companies for a number of years. When id=1, I would like to calculate the mean(ar) of the other 9 companies without taking this company into consideration. How can I do that? I would appreciate your help.
Thank you in advance. Please let me know if you need additional information.
Best,
Nikos
I think I have a relatively simple question which is giving me a hard time. I have daily data with abnormal returns (ar) for a sample of companies for a number of years. id is the company identifier and ind is the industry identifier. yearq is the year-quarter.
I would like to estimate the mean of ar for all other companies in the same industry, for every yearq. In other words, let's say for example that my first 10 companies (i.e., id=1, 2, ..., 10) belong to the first industry (ind==1). Given that my data is daily, I have daily abnormal returns for each of these companies for a number of years. When id=1, I would like to calculate the mean(ar) of the other 9 companies without taking this company into consideration. How can I do that? I would appreciate your help.
Thank you in advance. Please let me know if you need additional information.
Best,
Nikos
Comment