Hi to everyone
The short:
How can I ensure that a company has at least 8 yearly observations in my sample?
The long:
I am conducting a study on listed companies. My sample is comprised of listed companies observations over a number of years. So each observation is a company-year observation and each observation is identified by the company code and the year. I am trying to calculate a proxy composed of six rolling averages over a prior five-year window. The calculation requires that:
1. each company is listed for at least 6 years in order to calculate the prior five-year rolling averages
2. in order to be included in the sample, each company must be represented by 3 company-year observations after calculating the proxy.
So for example, in order to include company A at time T observation in the sample, it has to have observations at times T-1, T-2, T-3, T-4, and T-5 in order to calculate the rolling average. Then, it has to have another two observations (at time T+1 and T+2) in order to satisfy the second condition.
Is there a code I can use to ensure the presence of eight yearly observations for each company in my sample?
The short:
How can I ensure that a company has at least 8 yearly observations in my sample?
The long:
I am conducting a study on listed companies. My sample is comprised of listed companies observations over a number of years. So each observation is a company-year observation and each observation is identified by the company code and the year. I am trying to calculate a proxy composed of six rolling averages over a prior five-year window. The calculation requires that:
1. each company is listed for at least 6 years in order to calculate the prior five-year rolling averages
2. in order to be included in the sample, each company must be represented by 3 company-year observations after calculating the proxy.
So for example, in order to include company A at time T observation in the sample, it has to have observations at times T-1, T-2, T-3, T-4, and T-5 in order to calculate the rolling average. Then, it has to have another two observations (at time T+1 and T+2) in order to satisfy the second condition.
Is there a code I can use to ensure the presence of eight yearly observations for each company in my sample?
Comment